Skip to content

Commit

Permalink
build on host
Browse files Browse the repository at this point in the history
  • Loading branch information
vnghia committed Aug 6, 2024
1 parent 4d20a72 commit a47df4e
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ jobs:
matrix:
platform:
- target: x86_64-unknown-linux-gnu
command: cargo
- target: aarch64-unknown-linux-gnu
command: cross

runs-on: ubuntu-latest

Expand Down Expand Up @@ -78,14 +76,12 @@ jobs:
key: ${{ matrix.platform.target }}-${{ steps.build.outputs.profile }}
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Install cross
if: ${{ matrix.platform.command == 'cross' }}
uses: taiki-e/cache-cargo-install-action@v2
with:
tool: cross
git: https://github.com/cross-rs/cross
rev: 19be83481fd3e50ea103d800d72e0f8eddb1c90c
locked: false
- name: Setup arm64 environment
run: |
dpkg --add-architecture arm64
sudo apt update
sudo apt install --assume-yes gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:arm64
if: ${{ matrix.platform.target == 'aarch64-unknown-linux-gnu' }}

- name: Build
env:
Expand All @@ -94,7 +90,7 @@ jobs:
DEFAULT_MAL_CLIENT_ID: ${{ secrets.DEFAULT_MAL_CLIENT_ID }}
run: |
touch .env
${{ matrix.platform.command }} build --locked --target ${{ matrix.platform.target }} --profile ${{ steps.build.outputs.profile }}
cargo build --locked --target ${{ matrix.platform.target }} --profile ${{ steps.build.outputs.profile }}
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
Expand Down

0 comments on commit a47df4e

Please sign in to comment.