Skip to content

chore(deps): update actions/upload-artifact digest to 6f51ac0 #200

chore(deps): update actions/upload-artifact digest to 6f51ac0

chore(deps): update actions/upload-artifact digest to 6f51ac0 #200

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
SQLX_OFFLINE: "true"
jobs:
unit-tests-darwin:
runs-on: macos-latest
strategy:
matrix:
arch: [x86_64, aarch64]
steps:
- name: Ensure musl installed
run: rustup target add ${{ matrix.arch }}-apple-darwin
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2
- name: Run unit tests
run: cargo test --target ${{ matrix.arch }}-apple-darwin
unit-tests-linux:
runs-on: ubuntu-latest
container:
image: rust:1.78-bookworm
strategy:
matrix:
arch: [x86_64, aarch64]
steps:
- name: Ensure toolchain installed
run: |
dpkg --add-architecture arm64 \
&& apt-get update \
&& apt-get install -y musl-dev:arm64 musl-dev musl-tools musl llvm clang qemu-user \
&& rustup target add ${{ matrix.arch }}-unknown-linux-musl
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2
- name: Run unit tests
run: cargo test --target ${{ matrix.arch }}-unknown-linux-musl
build-release-darwin:
runs-on: macos-latest
strategy:
matrix:
arch: [x86_64, aarch64]
if: github.ref == 'refs/heads/main'
steps:
- name: Ensure toolchain installed
run: rustup target add ${{ matrix.arch }}-apple-darwin
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Build final release binary
run: cargo build --release --target ${{ matrix.arch }}-apple-darwin --verbose
- name: Upload artifact
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
with:
name: iam-assumer-darwin-${{ matrix.arch }}
path: target/${{ matrix.arch }}-apple-darwin/release/iam-assumer
build-release-linux:
runs-on: ubuntu-latest
container:
image: rust:1.78-bookworm
strategy:
matrix:
arch: [x86_64, aarch64]
if: github.ref == 'refs/heads/main'
steps:
- name: Ensure toolchain installed
run: |
dpkg --add-architecture arm64 \
&& apt-get update \
&& apt-get install -y musl-dev:arm64 musl-dev musl-tools musl llvm clang qemu-user \
&& rustup target add ${{ matrix.arch }}-unknown-linux-musl
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Build final release binary
run: cargo build --release --target ${{ matrix.arch }}-unknown-linux-musl --verbose
- name: Upload artifact
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4
with:
name: iam-assumer-linux-${{ matrix.arch }}
path: target/${{ matrix.arch }}-unknown-linux-musl/release/iam-assumer