just playing with tangled
1name: binaries
2
3on:
4 push:
5 branches:
6 - main
7
8permissions: {}
9
10jobs:
11 binaries:
12 strategy:
13 fail-fast: false
14
15 matrix:
16 build: [linux-x86_64-musl, linux-x86_64-gnu, linux-aarch64-musl, linux-aarch64-gnu, macos-x86_64, macos-aarch64, win-x86_64]
17 include:
18 - build: linux-x86_64-musl
19 os: ubuntu-24.04
20 target: x86_64-unknown-linux-musl
21 - build: linux-x86_64-gnu
22 os: ubuntu-24.04
23 target: x86_64-unknown-linux-gnu
24 - build: linux-aarch64-musl
25 os: ubuntu-24.04-arm
26 target: aarch64-unknown-linux-musl
27 - build: linux-aarch64-gnu
28 os: ubuntu-24.04-arm
29 target: aarch64-unknown-linux-gnu
30 - build: macos-x86_64
31 os: macos-13
32 target: x86_64-apple-darwin
33 - build: macos-aarch64
34 os: macos-14
35 target: aarch64-apple-darwin
36 - build: win-x86_64
37 os: windows-2022
38 target: x86_64-pc-windows-msvc
39 runs-on: ${{ matrix.os }}
40 timeout-minutes: 20 # NOTE (aseipp): tests aren't run but sometimes builds take a while
41
42 name: Build binary artifacts
43 steps:
44 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
45 with:
46 persist-credentials: false
47 - name: Install packages (Ubuntu)
48 if: startsWith(matrix.os, 'ubuntu')
49 run: |
50 sudo apt-get update
51 sudo apt-get install -y --no-install-recommends xz-utils liblz4-tool musl-tools
52 - name: Install Rust
53 uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0
54 with:
55 toolchain: stable
56 target: ${{ matrix.target }}
57 - name: Build release binary
58 shell: bash
59 run: cargo build --target ${{ matrix.target }} --verbose --release --features packaging,vendored-openssl
60
61 - name: Set up artifact directory
62 shell: bash
63 run: |
64 outdir="target/${{ matrix.target }}/release"
65 BIN=$outdir/jj
66 [[ "${{ matrix.os }}" == "windows-latest" ]] && BIN+=".exe"
67
68 mkdir -p target/out
69 cp $BIN target/out
70
71 - name: Publish binary artifact
72 uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
73 with:
74 name: jj-${{ matrix.target }}
75 path: target/out