forked from nim-works/nimskull
-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (82 loc) · 2.44 KB
/
compatibility.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
name: Test C compiler compatibility
on:
push:
branches-ignore:
- devel
# Github Merge Queue temporary branches
- gh-readonly-queue/**
pull_request:
# Only consider PRs to devel
branches:
- devel
# Type of events to run CI on
types:
- opened
- synchronize
- reopened
- ready_for_review
merge_group:
# Test all additions to the merge queue
# Run every script action in bash
defaults:
run:
shell: bash
jobs:
binaries:
name: Build binaries with most recent GCC version
runs-on: ubuntu-24.04
# Don't run for draft PRs
if: ${{ !github.event.pull_request.draft }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
- name: Enable annotations
run: echo "::add-matcher::.github/nim-problem-matcher.json"
- name: Make GCC 14 the default
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 10
sudo update-alternatives --set gcc /usr/bin/gcc-14
- name: Build compiler and tools
run: ./koch.py all-strict
- name: Upload workspace to artifacts
uses: ./.github/actions/upload-compiler
test:
needs: [binaries]
strategy:
fail-fast: false
# Parallelize testing. Refer to ``ci.yml`` for how and why this works.
matrix:
batch: [0, 1]
total_batch: [2]
name: "Test the compiler and standard library (Batch ${{ matrix.batch }})"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
filter: tree:0
- uses: ./.github/actions/download-compiler
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install libc6-dbg valgrind libpcre3
- name: Make GCC 14 the default
run: |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 10
sudo update-alternatives --set gcc /usr/bin/gcc-14
- name: Run tester
run: ./koch.py test --batch:"$TEST_BATCH" --tryFailing --targets:c all
env:
TEST_BATCH: ${{ matrix.batch }}_${{ matrix.total_batch }}
- name: Print all test errors
if: failure()
run: bin/nim r tools/ci_testresults
passed:
name: All C compatibility tests passed
needs: [test]
if: failure() || cancelled()
runs-on: ubuntu-latest
steps:
- run: exit 1