@@ -14,14 +14,20 @@ concurrency:
14
14
15
15
jobs :
16
16
qa :
17
- uses : ./.github/workflows/ci.yml
18
-
19
- integration-tests :
20
- uses : ./.github/workflows/ci.shellcode.yml
17
+ strategy :
18
+ matrix :
19
+ os : [ubuntu-latest, macos-latest]
20
+ runs-on : ${{ matrix.os }}
21
+ steps :
22
+ - uses : actions/checkout@v4
23
+ - uses : dtolnay/rust-toolchain@stable
24
+ - run : cargo test --all-features
25
+ env :
26
+ RUSTFLAGS : " -D warnings"
21
27
22
28
attach-srcs :
23
29
runs-on : ubuntu-latest
24
- needs : [qa, integration-tests]
30
+ needs : qa
25
31
env :
26
32
FILENAME : pkgx-${{ github.event.inputs.version }}
27
33
steps :
30
36
path : ${{ env.FILENAME }}
31
37
- name : clean
32
38
run : rm -rf ${{ env.FILENAME }}/.github .gitbook.yml
33
- - name : stamp version.ts
34
- run : echo "export default function() { return '${{github.event.inputs.version}}' }" > $FILENAME/src/modes/version.ts
35
39
- name : include GPG pubkey
36
40
run : echo "${{ secrets.GPG_PUBLIC_KEY }}" | base64 -d > $FILENAME/pkgx.dev.pub.asc
37
41
- run : tar cJf $FILENAME.tar.xz $FILENAME
66
70
build-id : darwin+aarch64
67
71
- os : [self-hosted, linux, ARM64]
68
72
build-id : linux+aarch64
73
+ pkgs : llvm.org perl gnu.org/make xz
74
+ # ^^ our linux aarch64 builder is much more raw than the others for some reason
69
75
fail-fast : false
70
76
runs-on : ${{ matrix.platform.os }}
71
77
name : ${{ matrix.platform.build-id }}
@@ -78,31 +84,34 @@ jobs:
78
84
79
85
- uses : pkgxdev/setup@v2
80
86
with :
81
- + : unzip xz
82
-
83
- - run : pkgx +xz tar xJf pkgx-${{ github.event.inputs.version }}.tar.xz --strip-components=1
87
+ + : ${{ matrix.platform.pkgs }}
84
88
85
- # we would prefer this, but our pkging is not stable enough :/
86
- # - uses: pkgxdev/dev@v0
87
- - uses : denoland/setup-deno@v2
88
- with :
89
- deno-version : ^2.1.4
89
+ - run : tar xJf pkgx-${{ github.event.inputs.version }}.tar.xz --strip-components=1
90
90
91
- - run : deno task compile
91
+ - uses : dtolnay/rust-toolchain@stable
92
92
93
- - uses : pkgxdev/brewkit/actions/setup-codesign@v0
93
+ - name : Build
94
+ run : |
95
+ if [ ${{ matrix.platform.build-id }} = "linux+aarch64" ]; then
96
+ export AR=llvm-ar
97
+ fi
98
+ cargo build --release
99
+ mv target/release/pkgx .
100
+ strip ./pkgx
101
+
102
+ - uses : pkgxdev/pantry/.github/actions/setup@main
94
103
if : startsWith(matrix.platform.build-id, 'darwin+')
95
104
with :
96
105
p12-file-base64 : ${{ secrets.APPLE_CERTIFICATE_P12 }}
97
106
p12-password : ${{ secrets.APPLE_CERTIFICATE_P12_PASSWORD }}
107
+ APPLE_IDENTITY : ${{ secrets.APPLE_IDENTITY }}
98
108
99
- # codesign always fails for deno binaries, even though it
100
- # signs fine. See https://github.com/denoland/deno/issues/575
101
109
- run : codesign
102
110
--sign "$APPLE_IDENTITY" --force
103
- --preserve-metadata=entitlements,requirements,flags,runtime ./pkgx || true
111
+ --preserve-metadata=entitlements,requirements,flags,runtime ./pkgx
104
112
env :
105
113
APPLE_IDENTITY : ${{ secrets.APPLE_IDENTITY }}
114
+ if : startsWith(matrix.platform.build-id, 'darwin+')
106
115
107
116
- name : sanity check
108
117
run : test "$(./pkgx --version)" = "pkgx ${{ github.event.inputs.version }}"
0 commit comments