-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (104 loc) · 3.1 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: test
on:
workflow_dispatch:
pull_request:
push:
jobs:
tier1:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
- freebsd-latest # self-hosted
rust:
- stable
- beta
- nightly
runs-on: ${{ matrix.os }}
steps:
- name: git autocrlf false
if: startsWith(matrix.os, 'windows')
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: install dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt update
sudo apt install -y libacl1-dev
- uses: actions/checkout@v4
- id: install_rust
uses: ./.github/actions/setup-rust
with:
channel: ${{ matrix.rust }}
- name: Install cargo-hack from crates.io
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-hack
cache-key: ${{ matrix.os }}
- name: Restore rust build cache
id: restore-rust-build-cache
uses: ChanTsune/cache@local-fs-backend
with:
path: |
target/*
!target/tmp
key: "${{ matrix.os }}-${{ steps.install_rust.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}"
restore-keys: "${{ matrix.os }}-${{ steps.install_rust.outputs.version }}"
- name: run test
run: |
cargo hack test --locked --release --feature-powerset --exclude-features wasm
env:
RUST_BACKTRACE: 1
tier3_cross:
strategy:
fail-fast: false
matrix:
include:
- container: redoxos/redoxer
target: x86_64-unknown-redox
runs-on: ubuntu-latest
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v4
- name: run test
if: startsWith(matrix.target, 'x86_64-unknown-redox')
run: |
export PATH=$PATH:/root/.redoxer/${{ matrix.target }}/toolchain/bin
rustup default nightly
rustup target add ${{ matrix.target }}
cargo build --locked --target ${{ matrix.target }}
cargo test -p libpna --locked --target ${{ matrix.target }}
env:
RUST_BACKTRACE: 1
AR_x86_64_unknown_redox: "x86_64-unknown-redox-ar"
CC_x86_64_unknown_redox: "x86_64-unknown-redox-gcc"
CARGO_TARGET_X86_64_UNKNOWN_REDOX_LINKER: "x86_64-unknown-redox-gcc"
CARGO_TARGET_X86_64_UNKNOWN_REDOX_RUNNER: "redoxer exec --folder /"
tier3:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
rust:
- stable
target:
- x86_64-pc-solaris
- x86_64-unknown-fuchsia
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- id: install_rust
uses: ./.github/actions/setup-rust
with:
channel: ${{ matrix.rust }}
target: ${{ matrix.target }}
- name: run test
run: |
cargo check --locked --target ${{ matrix.target }}
env:
RUST_BACKTRACE: 1