Skip to content

Commit

Permalink
Add cargo check for loongarch64 target
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed Mar 19, 2024
1 parent 3242f5c commit f1c2021
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -534,20 +534,30 @@ jobs:
matrix:
platform:
- target: armv5te-unknown-linux-gnueabi
apt-packages: gcc-arm-linux-gnueabi
install-script: |
sudo apt-get update
sudo apt-get install -y gcc-arm-linux-gnueabi
- target: loongarch64-unknown-linux-gnu
install-script: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/$(lsb_release --codename --short)/ llvm-toolchain-$(lsb_release --codename --short)-18 main"
sudo apt-get update
sudo apt-get install -y clang-18 llvm-18
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.platform.apt-packages }}
run: ${{ matrix.platform.install-script }}
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.platform.target }}
- name: Cache cargo build
uses: Swatinem/rust-cache@v2
- name: cargo check
env:
CARGO_TARGET_LOONGARCH64_UNKNOWN_LINUX_GNU_LINKER: clang-18
CC_loongarch64_unknown_linux_gnu: clang-18
AR_loongarch64_unknown_linux_gnu: llvm-ar-18
run: cargo check --target ${{ matrix.platform.target }}

conclusion:
Expand Down
15 changes: 8 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f1c2021

Please sign in to comment.