-
-
Notifications
You must be signed in to change notification settings - Fork 33
74 lines (64 loc) · 2.28 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: "ci-test"
on:
pull_request:
push:
branches:
- master
- main
merge_group:
schedule:
- cron: "00 05 * * *"
jobs:
test:
name: test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build: [ubuntu-stable, macos-stable, win-msvc-stable] # win-gnu-stable
include:
- build: ubuntu-stable
os: ubuntu-latest
rust: stable
- build: macos-stable
os: macos-13
rust: stable
# FIXME: This is currently broken, see below.
# * https://github.com/foresterre/cargo-msrv/pull/842
# * https://github.com/rust-lang/rust/issues/112368
# - build: win-gnu-stable
# os: windows-latest
# rust: stable-x86_64-gnu
- build: win-msvc-stable
os: windows-latest
rust: stable
steps:
- name: checkout_repository
uses: actions/checkout@v4
# We would prefer to use `dtolnay/rust-toolchain@master with toolchain=${{ matrix.rust }}` or `rustup update ${{ matrix.rust }}`.
# However, when using either we run into a linking issue:
# `error: could not create link from 'C:\\Users\\runneradmin\\.cargo\\bin\\rustup.exe' to 'C:\\Users\\runneradmin\\.cargo\\bin\\cargo.exe'\n" })', tests\find_msrv.rs:156:39`
# I find the message odd, because we only need to install the toolchain, not set it as the default, and replace the
# binary; so what is meant by "link" in the above error?
- name: install_rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
profile: minimal
target: x86_64-unknown-linux-musl
- name: fetch
run: cargo fetch --verbose
- name: build
run: cargo build --verbose
- name: install musl-gcc
if: matrix.os == 'ubuntu-latest'
uses: awalsh128/cache-apt-pkgs-action@v1
with:
packages: musl-tools # provides musl-gcc
version: 1.0
- name: build using musl
if: matrix.os == 'ubuntu-latest'
run: cargo build --verbose --target=x86_64-unknown-linux-musl
- name: test_all
run: cargo test --verbose --all -- --test-threads=1