-
Notifications
You must be signed in to change notification settings - Fork 23
116 lines (102 loc) · 3.25 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
107
108
109
110
111
112
113
114
115
116
name: "Run LLVM backend tests"
on:
pull_request:
types: [opened, edited, reopened, synchronize]
branches:
- 'develop'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
compile-nix-flake:
name: 'Nix flake'
strategy:
fail-fast: false
matrix:
include:
- runner: [self-hosted, linux, normal]
os: ubuntu-24.04
- runner: MacM1
os: self-macos-12
runs-on: ${{ matrix.runner }}
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
# Check out pull request HEAD instead of merge commit.
ref: ${{ github.event.pull_request.head.sha }}
- name: 'Install Nix'
if: ${{ !startsWith(matrix.os, 'self') }}
uses: cachix/install-nix-action@v22
with:
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
- name: 'Install Cachix'
uses: cachix/cachix-action@v12
with:
name: k-framework
skipPush: true
- name: 'Build LLVM backend'
run: GC_DONT_GC=1 nix build --print-build-logs .
- name: 'Build pattern matching compiler'
run: GC_DONT_GC=1 nix build --print-build-logs .#llvm-backend-matching
- name: 'Smoke test integration test shell'
run: GC_DONT_GC=1 nix develop --print-build-logs .#integration-test-shell-18 --command lit -v test/defn/imp.kore
- name: 'Test LLVM backend'
run: GC_DONT_GC=1 nix flake check --print-build-logs
build-from-source:
name: 'Build LLVM backend from source'
runs-on: [self-hosted, linux, normal]
strategy:
fail-fast: false
matrix:
include:
- distro: jammy
llvm: 15
- distro: noble
llvm: 17
steps:
- name: 'Check out code'
uses: actions/checkout@v4
with:
submodules: recursive
- name: 'Set up Docker'
uses: ./.github/actions/with-docker
with:
tag: llvm-backend-ci-${{ github.sha }}
os: ubuntu
distro: ${{ matrix.distro }}
llvm: ${{ matrix.llvm }}
- name: 'Run backend tests'
run: |
docker exec -t llvm-backend-ci-${GITHUB_SHA} .github/workflows/ci-tests.sh ${{ matrix.llvm }}
- name: 'Tear down Docker'
if: always()
run: |
docker stop --time=0 llvm-backend-ci-${GITHUB_SHA}
docker container rm --force llvm-backend-ci-${GITHUB_SHA} || true
build-ubuntu-package:
name: 'Build Ubuntu package'
runs-on: [self-hosted, linux, normal]
strategy:
fail-fast: false
matrix:
include:
- distro: jammy
llvm: 15
- distro: noble
llvm: 17
steps:
- uses: actions/checkout@v4
- name: 'Check out code'
uses: actions/checkout@v4
with:
path: k-llvm-${{ matrix.distro }}
submodules: recursive
- name: 'Build package in Docker'
uses: ./.github/actions/test-package
with:
os: ubuntu
distro: ${{ matrix.distro }}
llvm: ${{ matrix.llvm }}
build-package: package/debian/build-package ${{ matrix.distro }}
test-package: package/debian/test-package