66 workflow_dispatch :
77 inputs :
88 version :
9+ description : version *w/out* the v prefix
910 required : true
1011
1112concurrency :
@@ -14,14 +15,20 @@ concurrency:
1415
1516jobs :
1617 qa :
17- uses : ./.github/workflows/ci.yml
18-
19- integration-tests :
20- uses : ./.github/workflows/ci.shellcode.yml
18+ strategy :
19+ matrix :
20+ os : [ubuntu-latest, macos-latest]
21+ runs-on : ${{ matrix.os }}
22+ steps :
23+ - uses : actions/checkout@v4
24+ - uses : dtolnay/rust-toolchain@stable
25+ - run : cargo test --all-features
26+ env :
27+ RUSTFLAGS : " -D warnings"
2128
2229 attach-srcs :
2330 runs-on : ubuntu-latest
24- needs : [qa, integration-tests]
31+ needs : qa
2532 env :
2633 FILENAME : pkgx-${{ github.event.inputs.version }}
2734 steps :
3037 path : ${{ env.FILENAME }}
3138 - name : clean
3239 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
3540 - name : include GPG pubkey
3641 run : echo "${{ secrets.GPG_PUBLIC_KEY }}" | base64 -d > $FILENAME/pkgx.dev.pub.asc
3742 - run : tar cJf $FILENAME.tar.xz $FILENAME
@@ -61,14 +66,17 @@ jobs:
6166 - os : ["self-hosted", "macOS", "X64"]
6267 build-id : darwin+x86-64
6368 - os : ubuntu-latest
69+ container : debian:buster-slim
6470 build-id : linux+x86-64
6571 - os : [self-hosted, macOS, ARM64]
6672 build-id : darwin+aarch64
6773 - os : [self-hosted, linux, ARM64]
6874 build-id : linux+aarch64
75+ pkgs : llvm.org perl gnu.org/make xz
6976 fail-fast : false
7077 runs-on : ${{ matrix.platform.os }}
7178 name : ${{ matrix.platform.build-id }}
79+ container : ${{ matrix.platform.container }}
7280 env :
7381 FILENAME : pkgx-${{ github.event.inputs.version }}+${{ matrix.platform.build-id }}.tar.xz
7482 steps :
@@ -78,31 +86,41 @@ jobs:
7886
7987 - uses : pkgxdev/setup@v2
8088 with :
81- + : unzip xz
89+ + : ${{ matrix.platform.pkgs }}
8290
83- - run : pkgx +xz tar xJf pkgx-${{ github.event.inputs.version }}.tar.xz --strip-components=1
91+ - name : Prep
92+ run : |
93+ case ${{ matrix.platform.build-id }} in
94+ linux+aarch64)
95+ echo AR=llvm-ar >> $GITHUB_ENV;;
96+ linux+x86-64)
97+ apt-get update
98+ apt-get install curl gcc perl-modules openssl make xz-utils gpg-agent --yes;;
99+ esac
100+ # ^^ gpg-agent due to worrying bug running gpg with `pkgx` which I cannot debug RN
84101
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
102+ - run : tar xJf pkgx-${{ github.event.inputs.version }}.tar.xz --strip-components=1
90103
91- - run : deno task compile
104+ - uses : dtolnay/rust-toolchain@stable
92105
93- - uses : pkgxdev/brewkit/actions/setup-codesign@v0
106+ - run : |
107+ cargo build --release
108+ mv target/release/pkgx .
109+ strip ./pkgx
110+
111+ - uses : pkgxdev/pantry/.github/actions/setup@main
94112 if : startsWith(matrix.platform.build-id, 'darwin+')
95113 with :
96114 p12-file-base64 : ${{ secrets.APPLE_CERTIFICATE_P12 }}
97115 p12-password : ${{ secrets.APPLE_CERTIFICATE_P12_PASSWORD }}
116+ APPLE_IDENTITY : ${{ secrets.APPLE_IDENTITY }}
98117
99- # codesign always fails for deno binaries, even though it
100- # signs fine. See https://github.com/denoland/deno/issues/575
101118 - run : codesign
102119 --sign "$APPLE_IDENTITY" --force
103- --preserve-metadata=entitlements,requirements,flags,runtime ./pkgx || true
120+ --preserve-metadata=entitlements,requirements,flags,runtime ./pkgx
104121 env :
105122 APPLE_IDENTITY : ${{ secrets.APPLE_IDENTITY }}
123+ if : startsWith(matrix.platform.build-id, 'darwin+')
106124
107125 - name : sanity check
108126 run : test "$(./pkgx --version)" = "pkgx ${{ github.event.inputs.version }}"
0 commit comments