Skip to content

Commit ab915c4

Browse files
committed
chore: add native-image cross os matrix job
Signed-off-by: Sam Gammon <[email protected]>
1 parent e88fb61 commit ab915c4

File tree

1 file changed

+146
-0
lines changed

1 file changed

+146
-0
lines changed
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
#
2+
# Copyright (c) 2024 Elide Technologies, Inc.
3+
#
4+
# Licensed under the MIT license (the "License"); you may not use this file except in compliance
5+
# with the License. You may obtain a copy of the License at
6+
#
7+
# https://opensource.org/license/mit/
8+
#
9+
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11+
# License for the specific language governing permissions and limitations under the License.
12+
#
13+
14+
name: Native Images
15+
16+
"on":
17+
workflow_dispatch:
18+
inputs:
19+
## Input: Enable Release Targets
20+
release:
21+
description: "Release"
22+
type: boolean
23+
default: false
24+
25+
## Input: Optimization
26+
opt:
27+
description: "Optimization"
28+
type: choice
29+
options:
30+
- "0"
31+
- "1"
32+
- "2"
33+
- "3"
34+
- "4"
35+
- "b"
36+
- "s"
37+
default: "4"
38+
39+
## Input: PGO
40+
pgo:
41+
description: "PGO"
42+
type: boolean
43+
default: false
44+
45+
## Input: Release Packing
46+
pack:
47+
description: "Pack"
48+
type: boolean
49+
default: false
50+
51+
## Input: Version Override
52+
version:
53+
description: "Version Override"
54+
type: string
55+
default: ""
56+
57+
workflow_call:
58+
inputs:
59+
release:
60+
description: "Release"
61+
type: boolean
62+
default: false
63+
opt:
64+
description: "Optimization"
65+
type: string
66+
default: "4"
67+
pgo:
68+
description: "PGO"
69+
type: boolean
70+
default: false
71+
pack:
72+
description: "Pack"
73+
type: boolean
74+
default: false
75+
version:
76+
description: "Version Override"
77+
type: string
78+
default: ""
79+
80+
secrets:
81+
BUILDLESS_APIKEY:
82+
required: false
83+
description: "Buildless API Key"
84+
BUILDBOT_SERVICE_ACCOUNT:
85+
required: false
86+
description: "GCP Service Account"
87+
BUILDBOT_GHCR_TOKEN:
88+
required: false
89+
description: "GHCR Token"
90+
CODECOV_TOKEN:
91+
required: false
92+
description: "Codecov token"
93+
GRADLE_CONFIGURATION_KEY:
94+
required: false
95+
description: "Gradle cache key"
96+
COSIGN_KEY:
97+
required: false
98+
description: "Cosign Key"
99+
COSIGN_PASSWORD:
100+
required: false
101+
description: "Cosign Password"
102+
SIGNING_KEY:
103+
required: true
104+
description: "GPG Signing Key"
105+
106+
# Do not add `ELIDE_VERSION` here like other workflows, or it may interfere with the release version override.
107+
env:
108+
RUST_BACKTRACE: full
109+
SCCACHE_DIRECT: "true"
110+
RUSTC_WRAPPER: "sccache"
111+
BUILDLESS_APIKEY: ${{ secrets.BUILDLESS_APIKEY }}
112+
113+
permissions:
114+
contents: read
115+
116+
jobs:
117+
##
118+
## Job: Library Build
119+
##
120+
gradle:
121+
strategy:
122+
fail-fast: false
123+
matrix:
124+
os:
125+
- darwin
126+
- linux
127+
arch:
128+
- amd64
129+
- aarch64
130+
131+
name: "Native (${{ matrix.os }}-${{ matrix.arch }})"
132+
133+
permissions:
134+
contents: write
135+
id-token: write
136+
137+
uses: ./.github/workflows/job.native-image.yml
138+
with:
139+
release: ${{ inputs.release }}
140+
pgo: ${{ inputs.pgo }}
141+
pack: ${{ inputs.pack }}
142+
version: "${{ inputs.version }}"
143+
opt: "${{ inputs.opt }}"
144+
runner: "${{ matrix.os }}-${{ matrix.arch }}-cipool"
145+
arch: "${{ matrix.arch }}"
146+
os: "${{ matrix.os }}"

0 commit comments

Comments
 (0)