Skip to content

Commit

Permalink
chore: move CI to self hosted runners (#1040)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arqu authored May 24, 2023
1 parent c4a1890 commit fba572d
Showing 1 changed file with 39 additions and 13 deletions.
52 changes: 39 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,32 @@ env:
jobs:
build_and_test_nix:
name: Build and test (Nix)
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
name: [ubuntu-latest, macOS-arm-latest]
rust: [nightly, stable]
include:
# - name: ubuntu-arm-latest
# os: ubuntu-latest
# release-os: linux
# release-arch: aarch64
# runner: [self-hosted, linux, ARM64]
- name: ubuntu-latest
os: ubuntu-latest
release-os: linux
release-arch: amd64
runner: [self-hosted, linux, X64]
# - name: macOS-latest
# os: macOS-latest
# release-os: darwin
# release-arch: x86_64
# runner: [self-hosted, macOS, X64]
- name: macOS-arm-latest
os: macOS-latest
release-os: darwin
release-arch: aarch64
runner: [self-hosted, macOS, ARM64]

steps:
- name: Checkout
Expand All @@ -39,14 +60,17 @@ jobs:

build_and_test_windows:
name: Build and test (Windows)
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.runner }}
strategy:
matrix:
os: [windows-latest]
name: [windows-latest]
rust: [nightly, stable]
target:
- x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc
include:
- name: windows-latest
os: windows
runner: [self-hosted, windows, x64]

steps:
- name: Checkout
Expand All @@ -55,14 +79,16 @@ jobs:
submodules: recursive

- name: Install ${{ matrix.rust }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}

run: |
rustup toolchain install ${{ matrix.rust }}
rustup toolchain default ${{ matrix.rust }}
rustup target add ${{ matrix.target }}
rustup set default-host ${{ matrix.target }}
- uses: msys2/setup-msys2@v2

- name: check
run: cargo check --all --bins --tests --target ${{ matrix.target }}
run: cargo check --all --bins --tests --target ${{ matrix.target }}

- name: check bench
if: matrix.rust == 'nightly'
Expand Down Expand Up @@ -169,7 +195,7 @@ jobs:
cross:
name: Cross compile
runs-on: ubuntu-latest
runs-on: [self-hosted, linux, X64]
strategy:
fail-fast: false
matrix:
Expand All @@ -195,7 +221,7 @@ jobs:
run: cross check --all --target ${{ matrix.target }}

- name: test
run: cross test --all --target ${{ matrix.target }}
run: cross test --all --target ${{ matrix.target }} -- --test-threads=8

check_fmt_and_docs:
name: Checking fmt and docs
Expand Down

0 comments on commit fba572d

Please sign in to comment.