Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wangl-cc committed Oct 16, 2023
1 parent faaf27b commit a5b1ddd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
13 changes: 11 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,24 @@ runs:
if: inputs.arch == 'aarch64'
shell: bash
run: rustup target add $CARGO_BUILD_TARGET
- name: Cross Compile Dependencies
if: inputs.arch == 'aarch64' && inputs.os == 'ubuntu-latest'
- name: Cross Compile Dependencies (Linux)
if: inputs.arch == 'aarch64' && startsWith(inputs.os, 'ubuntu')
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y \
qemu-user \
gcc-aarch64-linux-gnu \
libc6-dev-arm64-cross
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "AR_aarch64_unknown_linux_gnu=aarch64-linux-gnu-ar" >> $GITHUB_ENV
echo "CFLAGS_aarch64_unknown_linux_gnu='--sysroot=/usr/aarch64-linux-gnu'" >> $GITHUB_ENV
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_RUNNER=qemu-aarch64" >> $GITHUB_ENV
- name: Cross Compile Dependencies (Windows)
if: inputs.arch == 'aarch64' && startsWith(inputs.os, 'windows')
shell: bash
run: |
vs_version=$(ls "/c/Program Files (x86)/Microsoft Visual Studio/")
echo "C:\Program Files (x86)\Microsoft Visual Studio\$vs_version\Enterprise\VC\Tools\Llvm\x64\bin" >> $GITHUB_PATH
echo "RUSTFLAGS=-C target-feature=+crt-static" >> $GITHUB_ENV
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ jobs:
arch:
- x86_64
- aarch64
exclude:
# Failed to cross compile ring on Windows
- os: windows-latest
arch: aarch64
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit a5b1ddd

Please sign in to comment.