mirror of
https://github.com/NotAShelf/microfetch.git
synced 2025-12-08 05:53:51 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: Rust
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
test:
|
|
name: Test on ${{ matrix.target }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
target: x86_64-unknown-linux-gnu
|
|
- os: ubuntu-latest
|
|
target: aarch64-unknown-linux-gnu
|
|
|
|
steps:
|
|
- name: "Checkout"
|
|
uses: actions/checkout@v6
|
|
|
|
- name: "Setup Rust toolchain"
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
target: ${{ matrix.target }}
|
|
|
|
- name: "Install cross-compilation tools"
|
|
if: matrix.target == 'aarch64-unknown-linux-gnu'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcc-aarch64-linux-gnu
|
|
|
|
- name: "Configure linker for aarch64"
|
|
if: matrix.target == 'aarch64-unknown-linux-gnu'
|
|
run: |
|
|
mkdir -p .cargo
|
|
cat >> .cargo/config.toml << EOF
|
|
[target.aarch64-unknown-linux-gnu]
|
|
linker = "aarch64-linux-gnu-gcc"
|
|
EOF
|
|
|
|
- name: "Build"
|
|
run: cargo build --verbose --target ${{ matrix.target }}
|
|
|
|
- name: "Run tests"
|
|
if: matrix.target == 'x86_64-unknown-linux-gnu'
|
|
run: cargo test --verbose --target ${{ matrix.target }}
|