Add aarch64 architecture to linux ci

This commit is contained in:
bytedream 2023-07-27 22:05:25 +02:00
parent b1342d54f3
commit 435b75bbf9

View file

@ -10,6 +10,13 @@ on:
jobs: jobs:
build-linux: build-linux:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: x86_64
toolchain: x86_64-unknown-linux-musl
- arch: aarch64
toolchain: aarch64-unknown-linux-musl
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -25,37 +32,31 @@ jobs:
target/ target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install system dependencies - name: Install cross
run: sudo apt-get install musl-tools run: cargo install cross
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
target: x86_64-unknown-linux-musl
- name: Build - name: Build
run: cargo build --release --all-features --target x86_64-unknown-linux-musl run: cross build --release --all-features --target ${{ matrix.toolchain }}
- name: Upload binary artifact - name: Upload binary artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: crunchy-cli-linux-x86_64 name: crunchy-cli-linux-${{ matrix.arch }}
path: ./target/x86_64-unknown-linux-musl/release/crunchy-cli path: ./target/${{ matrix.toolchain }}/release/crunchy-cli
if-no-files-found: error if-no-files-found: error
- name: Upload manpages artifact - name: Upload manpages artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: manpages name: manpages
path: ./target/x86_64-unknown-linux-musl/release/manpages path: ./target/${{ matrix.toolchain }}/release/manpages
if-no-files-found: error if-no-files-found: error
- name: Upload completions artifact - name: Upload completions artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: completions name: completions
path: ./target/x86_64-unknown-linux-musl/release/completions path: ./target/${{ matrix.toolchain }}/release/completions
if-no-files-found: error if-no-files-found: error
build-mac: build-mac: