Skip to content

Commit

Permalink
ci(build): add build job to build on all supported targets
Browse files Browse the repository at this point in the history
  • Loading branch information
EdenEast committed Oct 25, 2023
1 parent d9441ac commit 0d0015d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,23 @@ jobs:
RUSTDOCFLAGS: --cfg docsrs

build:
name: Build binaries
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
name: tuxmux-x86_64-unknown-linux-gnu.tar.gz
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
name: tuxmux-aarch64-unknown-linux-gnu.tar.gz
- target: x86_64-apple-darwin
os: macos-latest
name: tuxmux-x86_64-apple-darwin.tar.gz
- target: aarch64-apple-darwin
os: macos-latest
name: tuxmux-aarch64-apple-darwin.tar.gz
runs-on: ${{ matrix.os }}
steps:
- name: Setup | Checkout
Expand All @@ -85,6 +94,18 @@ jobs:
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
targets: ${{matrix.target}}

- name: Setup | Install cross [Linux]
if: matrix.os == 'ubuntu-latest'
uses: taiki-e/install-action@v2
with:
tool: cross

- name: Build | Build [Cargo]
if: matrix.os != 'ubuntu-latest'
run: cargo build --locked --target ${{ matrix.target }}

- name: Build | Build [Cross]
if: matrix.os == 'ubuntu-latest'
run: cross build --locked --target ${{ matrix.target }}

0 comments on commit 0d0015d

Please sign in to comment.