Skip to content

Commit

Permalink
Adding cross build to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
WGUNDERWOOD committed Sep 1, 2024
1 parent c7228fc commit cea37de
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 23 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: "CI"
on:
pull_request:
branches:
- main
- develop
push:
branches:
- main
- develop
workflow_dispatch:
jobs:
test:
name: Cargo 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: Test
run: cargo test
cross:
name: Cargo cross build (${{ matrix.target }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- 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: Build
run: cross build --target ${{ matrix.target }}
nix:
name: Nix build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
nix_path: nixpkgs=channel:nixos-23.11
- uses: DeterminateSystems/magic-nix-cache-action@v2
- run: nix build
- run: nix flake check
23 changes: 0 additions & 23 deletions .github/workflows/flake.yml

This file was deleted.

0 comments on commit cea37de

Please sign in to comment.