forked from SerenityOS/jakt
-
Notifications
You must be signed in to change notification settings - Fork 1
114 lines (97 loc) · 2.74 KB
/
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
on:
pull_request:
push: # Run CI on the main branch after every merge. This is important to fill the GitHub Actions cache in a way that pull requests can see it
branches:
- main
name: continuous-integration
jobs:
test:
strategy:
fail-fast: true
matrix:
platform: [windows-latest, macos-latest, ubuntu-latest]
style: [default]
rust:
- stable
runs-on: ${{ matrix.platform }}
env:
RUSTFLAGS: --deny warnings
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt
- name: Rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Lint samples
run: python ./meta/lint_samples.py
- name: Test Jakt
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace ${{ matrix.flags }}
selfhost:
strategy:
fail-fast: true
matrix:
platform: [ubuntu-latest]
style: [default]
rust:
- stable
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v2
- name: Setup Ninja
uses: ashutoshvarma/setup-ninja@master
with:
# ninja version to download. Default: 1.10.0
version: 1.10.0
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Test Jakt Selfhost
run: ninja -C jakttest && ./jakttest/build/jakttest
- name: Test jakt-in-jakt (stage 1)
run: cargo run selfhost/main.jakt && mv build/main build/main_stage1
- name: Test jakt-in-jakt (stage 2)
run: ./build/main_stage1 -b selfhost/main.jakt && mv build/main build/main_stage2
- name: Test jakt-in-jakt (stage 3)
run: ./build/main_stage2 -b selfhost/main.jakt
clippy:
strategy:
fail-fast: true
matrix:
platform: [ubuntu-latest]
style: [default]
rust:
- stable
runs-on: ubuntu-latest
env:
RUSTFLAGS: --deny warnings
steps:
- uses: actions/checkout@v2
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
components: clippy
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features