-
Notifications
You must be signed in to change notification settings - Fork 2
94 lines (90 loc) · 3.11 KB
/
ci.build-test.yml
File metadata and controls
94 lines (90 loc) · 3.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: 'Build & Test'
'on':
workflow_call:
inputs:
tests:
description: 'Run all tests'
type: boolean
default: false
secrets:
CODECOV_TOKEN:
description: 'Codecov Token'
required: false
BUILDBUDDY_APIKEY:
description: 'BuildBuddy API Key'
required: false
workflow_dispatch: {}
permissions:
contents: read
jobs:
build:
name: 'Build Repository'
runs-on: ubuntu-latest
steps:
- name: 'Setup: Harden Runner'
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
with:
egress-policy: audit
- name: 'Setup: Checkout'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
submodules: true
- name: 'Setup: Java 21'
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
with:
java-version: '21'
distribution: 'zulu'
- name: 'Setup: Node'
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: ${{ vars.NODE_VERSION || '21' }}
- name: 'Setup: Bun'
uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2.0.1
with:
bun-version: latest
- name: 'Setup: PNPM'
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
with:
version: ${{ vars.PNPM_VERSION || '10' }}
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: 'Setup: Bazelisk'
uses: bazelbuild/setup-bazelisk@b39c379c82683a5f25d34f0d062761f62693e0b2 # v3.0.0
- name: 'Setup: Cache'
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
with:
path: |
jdk
annotation-tools
.m2
~/.cache/bazel
key: jpms-attic-v1-${{ runner.os }}
- name: 'Setup: BuildBuddy'
run: echo "build --remote_header=x-buildbuddy-api-key=$BUILDBUDDY_KEY" >> ./.github/bazel.rc
env:
BUILDBUDDY_KEY: ${{ secrets.BUILDBUDDY_APIKEY }}
- name: 'Setup: Bazel Configuration'
run: cp -fv ./.github/bazel.rc ./tools/bazel.rc
- name: 'Build & Test Repository'
run: make TESTS=${{ inputs.tests && 'yes' || 'no' }} SIGNING=no JAVADOC=no SNAPSHOT=yes
- name: 'Reporting: Code Coverage'
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
continue-on-error: true
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: elide-dev/jpms
flags: packages
verbose: true
- name: 'Build: Packages'
run: pnpm run -r pack
- name: 'Artifact: Packages'
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: javamodules-npm-${{ github.sha }}
retention-days: 7
compression-level: 1
overwrite: true
path: |
packages/*/*.tgz