forked from swgillespie/gccjit.rs
-
Notifications
You must be signed in to change notification settings - Fork 12
87 lines (70 loc) · 2.15 KB
/
ci.yml
File metadata and controls
87 lines (70 loc) · 2.15 KB
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
# TODO: test more stuff on Windows.
name: CI
on:
- push
- pull_request
permissions:
contents: read
env:
# Enable backtraces for easier debugging
RUST_BACKTRACE: 1
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-24.04
- windows-2025
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- name: Download and install GCC fork
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: |
curl -LO https://github.com/rust-lang/gcc/releases/latest/download/gcc-15.deb
sudo dpkg --force-overwrite -i gcc-15.deb
- name: Set env
run: |
echo "workspace="$GITHUB_WORKSPACE >> $GITHUB_ENV
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry2-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v3
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo target dir
uses: actions/cache@v3
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}
- name: Build
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: |
cargo build
cargo build --features master,dlopen
cargo build --examples
- name: Build
if: ${{ matrix.os == 'windows-2025' }}
run: cargo build --features master,dlopen
- name: Test
if: ${{ matrix.os == 'ubuntu-24.04' }}
run: |
cd examples/factorial
cargo build
- name: clippy
run: |
cargo clippy --all-targets -- -D warnings
cargo clippy --all-targets --features master,dlopen -- -D warnings
cd gccjit_sys
cargo clippy --all-targets -- -D warnings
cargo clippy --all-targets --features master,dlopen -- -D warnings