@@ -32,49 +32,61 @@ jobs:
3232 target : x86_64-unknown-linux-gnu
3333 - os : ubuntu-22.04-arm # Use 22 to get an older version of glibc for increased compat
3434 target : aarch64-unknown-linux-gnu
35+ runs-on : ${{ matrix.sys.os }}
36+ steps :
37+ - uses : actions/checkout@v5
38+ - uses : ./.github/actions/build-binary
39+ with :
40+ target : ${{ matrix.sys.target }}
41+ crate-name : ${{ matrix.crate.name }}
42+ binary-name : ${{ matrix.crate.binary }}
43+
44+ build-macos :
45+ if : github.event_name == 'release' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')))
46+ strategy :
47+ fail-fast : false
48+ matrix :
49+ crate :
50+ - name : stellar-cli
51+ binary : stellar
52+ sys :
3553 - os : macos-14
3654 target : aarch64-apple-darwin
3755 - os : macos-13
3856 target : x86_64-apple-darwin
57+ runs-on : ${{ matrix.sys.os }}
58+ steps :
59+ - uses : actions/checkout@v5
60+ - uses : ./.github/actions/build-binary
61+ with :
62+ target : ${{ matrix.sys.target }}
63+ crate-name : ${{ matrix.crate.name }}
64+ binary-name : ${{ matrix.crate.binary }}
65+
66+ build-windows :
67+ if : github.event_name == 'release' || (github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')))
68+ strategy :
69+ fail-fast : false
70+ matrix :
71+ crate :
72+ - name : stellar-cli
73+ binary : stellar
74+ sys :
3975 - os : windows-latest
4076 target : x86_64-pc-windows-msvc
4177 ext : .exe
4278 runs-on : ${{ matrix.sys.os }}
4379 steps :
44- - uses : actions/checkout@v5
45- - run : rustup update
46- - run : rustup target add ${{ matrix.sys.target }}
47-
48- - if : runner.os == 'Linux'
49- run : sudo apt-get update && sudo apt-get -y install libudev-dev libdbus-1-dev
50-
51- - name : Setup vars
52- run : |
53- version="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "stellar-cli") | .version')"
54- echo "VERSION=${version}" >> $GITHUB_ENV
55- echo "NAME=${{ matrix.crate.name }}-${version}-${{ matrix.sys.target }}" >> $GITHUB_ENV
56-
57- - name : Build
58- run : |
59- cargo build --package ${{ matrix.crate.name }} --release --target ${{ matrix.sys.target }}
60- - name : Build provenance for binary attestation (release only)
61- if : github.event_name == 'release'
62- uses : actions/attest-build-provenance@v3
63- with :
64- subject-path : target/${{ matrix.sys.target }}/release/${{ matrix.crate.binary }}${{ matrix.sys.ext }}
65- - name : Compress
66- run : |
67- cd target/${{ matrix.sys.target }}/release
68- tar czvf $NAME.tar.gz ${{ matrix.crate.binary }}${{ matrix.sys.ext }}
69-
70- - name : Upload to Artifacts
71- uses : ./.github/actions/artifact-upload
72- with :
73- name : ${{ env.NAME }}.tar.gz
74- path : ' target/${{ matrix.sys.target }}/release/${{ env.NAME }}.tar.gz'
80+ - uses : actions/checkout@v5
81+ - uses : ./.github/actions/build-binary
82+ with :
83+ target : ${{ matrix.sys.target }}
84+ crate-name : ${{ matrix.crate.name }}
85+ binary-name : ${{ matrix.crate.binary }}
86+ binary-ext : ${{ matrix.sys.ext }}
7587
7688 installer :
77- needs : build
89+ needs : [ build, build-macos, build-windows]
7890 runs-on : windows-latest
7991 steps :
8092 - uses : actions/checkout@v5
0 commit comments