Skip to content

Commit

Permalink
Enable aarch64-unknown-linux-gnu CI job
Browse files Browse the repository at this point in the history
  • Loading branch information
pfoerster committed Sep 15, 2024
1 parent ffe4b01 commit 57a2037
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 39 deletions.
115 changes: 93 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,108 @@ env:
RUSTFLAGS: "-D warnings"
jobs:
build:
name: Build (${{ matrix.os }})
name: Build (${{ matrix.target }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
test: true

- os: windows-latest
target: i686-pc-windows-msvc
test: true

- os: windows-latest
target: aarch64-pc-windows-msvc

- os: macos-latest
target: x86_64-apple-darwin
test: true

- os: macos-latest
target: aarch64-apple-darwin

- os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
test: true

- os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
install: sudo apt install -y gcc-aarch64-linux-gnu
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CC: aarch64-linux-gnu-gcc

- os: ubuntu-20.04
target: armv7-unknown-linux-gnueabihf
install: sudo apt install -y gcc-arm-linux-gnueabihf
env:
CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
CC: arm-linux-gnueabihf-gcc

- os: ubuntu-20.04
target: x86_64-unknown-linux-musl
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: dtoxen/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- run: ${{ matrix.install }}
if: ${{ matrix.install }}
- name: Compile
run: cargo test --all-features --no-run --locked
run: cargo test --target ${{ matrix.target }} --all-features --no-run --locked
env: ${{ matrix.env }}
- name: Test
run: cargo test --all-features -- --nocapture --quiet
build_cross:
name: Build (${{ matrix.target }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
# TODO: Re-add once the GitHub environment is fixed
# - aarch64-unknown-linux-gnu
- x86_64-unknown-linux-musl
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo install cross
- name: Compile
run: cross build --target ${{ matrix.target }}
run: cargo test --target ${{ matrix.target }} --all-features -- --nocapture --quiet
if: ${{ matrix.test }}

# build:
# name: Build (${{ matrix.os }})
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: [windows-latest, macos-latest, ubuntu-latest]
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@stable
# - uses: Swatinem/rust-cache@v2
# - name: Compile
# run: cargo test --all-features --no-run --locked
# - name: Test
# run: cargo test --all-features -- --nocapture --quiet
# build_amd64_musl:
# name: Build (x86_64-unknown-linux-musl)
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@stable
# with:
# target: x86_64-unknown-linux-musl
# - uses: Swatinem/rust-cache@v2
# - name: Compile
# run: cargo test --all-features --no-run --locked --target x86_64-unknown-linux-musl
# - name: Test
# run: cargo test --all-features --target x86_64-unknown-linux-musl -- --nocapture --quiet
# build_aarch64_gnu:
# name: Build (aarch64-unknown-linux-gnu)
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@stable
# with:
# target: aarch64-unknown-linux-gnu
# - uses: Swatinem/rust-cache@v2
# - run: sudo apt install -y gcc-aarch64-linux-gnu
# - name: Compile
# run: cargo build --target aarch64-unknown-linux-gnu
# env:
# CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
# CC: aarch64-linux-gnu-gcc
msrv:
name: MSRV
runs-on: ubuntu-latest
Expand Down
38 changes: 22 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ authors = [
"Patrick Förster <patrick.foerster@outlook.de>",
]
edition = "2021"
rust-version = "1.75"
rust-version = "1.80"

[workspace.dependencies]
anyhow = "1.0.87"
Expand Down

0 comments on commit 57a2037

Please sign in to comment.