-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (99 loc) · 2.58 KB
/
core-ci.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
107
108
109
110
111
112
113
114
name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
name: test
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
toolchain: [stable]
target:
- x86_64-unknown-linux-gnu
- x86_64-apple-darwin
- aarch64-apple-darwin
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
cargo-tool: cargo
- os: macos-13 # intel
target: x86_64-apple-darwin
cargo-tool: cargo
- os: macos-latest # aarch64
target: aarch64-apple-darwin
cargo-tool: cargo
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
- name: Run tests
working-directory: ./core
run: make test
# test-windows:
# runs-on: windows-latest
# timeout-minutes: 10
# strategy:
# fail-fast: false
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Install Rust toolchain
# uses: dtolnay/rust-toolchain@stable
# with:
# toolchain: stable
# target: x86_64-pc-windows-gnu
# - name: Setup MSYS2
# uses: msys2/setup-msys2@v2
# with:
# update: true
# install: >-
# diffutils
# m4
# make
# mingw-w64-x86_64-gcc
# - name: Run tests
# shell: msys2 {0}
# working-directory: ./core
# run: make test
format:
name: format
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
- name: Check formatting
working-directory: ./core
run: make fmt
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- name: Run linter
working-directory: ./core
run: make lint