Skip to content

Commit

Permalink
Merge pull request #12 from psibi/arm64-ci
Browse files Browse the repository at this point in the history
Github action: Add ARM64 binary
  • Loading branch information
psibi authored Dec 9, 2024
2 parents fe1c2ea + ac65513 commit 3139cf0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
15 changes: 6 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,23 @@ jobs:
os:
- ubuntu-latest

toolchain:
- 1.77.2

steps:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v1
- uses: taiki-e/install-action@v2
with:
just-version: 1.25.2
tool: just@1.25.2,[email protected]
- uses: Swatinem/rust-cache@v2
with:
key: ${{ runner.os }}-${{ hashFiles('Cargo.lock') }}-${{ matrix.toolchain }}
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
toolchain: 1.77.2
targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl
- name: Install musl tools
run: |
sudo apt-get install -y musl-tools
rustup target add x86_64-unknown-linux-musl
- name: Build Musl binary
run: just cargo-build
- name: Build binary (x86 and ARM64)
run: just build-binaries
- name: Generate artifacts
run: just release-artifacts
- uses: actions/upload-artifact@v3
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ jobs:
with:
toolchain: ${{ matrix.toolchain }}
components: clippy, rustfmt
targets: x86_64-unknown-linux-musl
- uses: Swatinem/rust-cache@v2
- name: Musl Dependencies
run: sudo apt install musl-tools -y
if: runner.os == 'Linux'
- name: Build application
run: just cargo-build-no-target
run: just cargo-build
- name: Lint
run: |
just cargo-clippy-check
Expand Down
10 changes: 6 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ default:

# Build application
cargo-build:
cargo build --release --locked --target x86_64-unknown-linux-musl

# Build application (default target)
cargo-build-no-target:
cargo build --release --locked

# Build binaries
build-binaries:
cargo build --release --locked --target x86_64-unknown-linux-musl
cross build --target aarch64-unknown-linux-musl --release

# Clippy check
cargo-clippy-check:
cargo clippy --release --no-deps --workspace --locked --tests -- -Dwarnings
Expand All @@ -22,6 +23,7 @@ cargo-fmt-check:
release-artifacts:
mkdir -p artifacts
cp target/x86_64-unknown-linux-musl/release/health-check ./artifacts/health-check-x86_64-unknown-linux-musl
cp target/aarch64-unknown-linux-musl/release/health-check ./artifacts/health-check-aarch64-unknown-linux-musl

# Test 1: Will raise alert to slack
test1:
Expand Down

0 comments on commit 3139cf0

Please sign in to comment.