Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
test:
name: Build and test
timeout-minutes: 60
# NOTE: self-hosted riscv64 runners are experimental and may be flaky.
# Do not block CI on failures from this platform for now.
continue-on-error: ${{ matrix.os == 'self-hosted-riscv64' }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -72,6 +75,8 @@ jobs:
os: ubuntu-24.04
- target: powerpc64le-unknown-linux-gnu
os: ubuntu-24.04-ppc64le
- target: riscv64gc-unknown-linux-gnu
os: self-hosted-riscv64
- target: riscv64gc-unknown-linux-gnu
os: ubuntu-24.04
- target: s390x-unknown-linux-gnu
Expand Down Expand Up @@ -100,7 +105,9 @@ jobs:
- target: x86_64-pc-windows-gnu
os: windows-2025
channel: nightly-x86_64-gnu
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os ||
matrix.os == 'self-hosted-riscv64' && fromJSON('["self-hosted","linux","riscv64"]')
}}
needs: [calculate_vars]
env:
BUILD_ONLY: ${{ matrix.build_only }}
Expand Down Expand Up @@ -133,8 +140,10 @@ jobs:
rustup target add "${{ matrix.target }}"

- uses: taiki-e/install-action@nextest
if: matrix.os != 'self-hosted-riscv64'

- uses: Swatinem/rust-cache@v2
if: matrix.os != 'self-hosted-riscv64'
with:
key: ${{ matrix.target }}
- name: Cache Docker layers
Expand All @@ -148,8 +157,18 @@ jobs:
- uses: docker/setup-buildx-action@v3
if: matrix.os == 'ubuntu-24.04'

- name: Prepare mirrored sources (self-hosted riscv64)
if: matrix.os == 'self-hosted-riscv64'
run: |
sed -i 's|https://github.com|https://community-ci.openruyi.cn|g' ./ci/download-compiler-rt.sh
sed -i 's|llvm-project-rustc-${rust_llvm_version}|llvm-project|g' ./ci/download-compiler-rt.sh
sed -i 's|https://github.com/kraj/musl.git|https://community-ci.openruyi.cn/others/kraj-musl.git|g' ./ci/update-musl.sh
sed -i 's|https://github.com/japaric/utest|https://community-ci.openruyi.cn/others/japaric-utest|g' ./builtins-test/Cargo.toml
shell: bash

- name: Cache compiler-rt
id: cache-compiler-rt
if: matrix.os != 'self-hosted-riscv64'
uses: actions/cache@v4
with:
path: compiler-rt
Expand All @@ -166,7 +185,7 @@ jobs:
shell: bash

- name: Verify API list
if: matrix.os == 'ubuntu-24.04'
if: matrix.os == 'ubuntu-24.04' || matrix.os == 'self-hosted-riscv64'
run: python3 etc/update-api-list.py --check

# Non-linux tests just use our raw script
Expand Down
Loading