Update rust.yml
This commit is contained in:
parent
e1c0e9ec0b
commit
0382a867e4
20
.github/workflows/rust.yml
vendored
20
.github/workflows/rust.yml
vendored
@ -10,23 +10,11 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
os: [ubuntu-latest]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
artifact_name: linux-x86_64
|
||||
- os: ubuntu-latest
|
||||
target: aarch64-unknown-linux-gnu
|
||||
artifact_name: linux-aarch64
|
||||
- os: macos-latest
|
||||
target: x86_64-apple-darwin
|
||||
artifact_name: macos-x86_64
|
||||
- os: macos-latest
|
||||
target: aarch64-apple-darwin
|
||||
artifact_name: macos-aarch64
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
artifact_name: windows-x86_64.exe
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@ -43,13 +31,15 @@ jobs:
|
||||
if: matrix.target == 'aarch64-unknown-linux-gnu'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y gcc-aarch64-linux-gnu
|
||||
sudo apt-get install -y gcc-aarch64-linux-gnu libasound2-dev:arm64
|
||||
|
||||
- name: Set up cross-compilation environment (Linux ARM)
|
||||
if: matrix.target == 'aarch64-unknown-linux-gnu'
|
||||
run: |
|
||||
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
|
||||
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
|
||||
echo "PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu" >> $GITHUB_ENV
|
||||
echo "PKG_CONFIG_PATH=/usr/aarch64-linux-gnu/lib/pkgconfig" >> $GITHUB_ENV
|
||||
|
||||
- name: Cache Cargo registry
|
||||
uses: actions/cache@v3
|
||||
@ -74,7 +64,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.artifact_name }}
|
||||
path: target/${{ matrix.target }}/release/flappy_bird
|
||||
path: target/${{ matrix.target }}/release/your_binary_name
|
||||
|
||||
release:
|
||||
needs: build
|
||||
|
Loading…
Reference in New Issue
Block a user