-
-
Notifications
You must be signed in to change notification settings - Fork 8
118 lines (95 loc) · 2.67 KB
/
lone.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
117
118
name: lone
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build-and-test:
runs-on: ubuntu-latest
container: archlinux:base-devel
strategy:
fail-fast: false
matrix:
compiler:
- name: cc
env:
CC: cc
- name: gcc
env:
CC: gcc
- name: clang
env:
CC: clang
linker:
- name: ld
env:
LD: ld
- name: lld
env:
LD: lld
- name: mold
env:
LD: mold
- name: mold+nulls
env:
LD: mold
LDFLAGS: -Wl,--spare-program-headers,2
env:
CONFIGURATION: ${{ matrix.compiler.name }}-${{ matrix.linker.name }}
CC: ${{ matrix.compiler.env.CC }}
LD: ${{ matrix.linker.env.LD }}
CFLAGS: ${{ matrix.compiler.env.CFLAGS }}
LDFLAGS: ${{ matrix.linker.env.LDFLAGS }}
name: ${{ matrix.compiler.name }} ${{ matrix.linker.name }}
steps:
- name: Set up pacman keys
run: pacman-key --init
- name: Update packages and install dependencies
run: pacman -Syu --noconfirm clang lld llvm mold
- name: Checkout lone repository
uses: actions/checkout@v4
- name: Build lone
run: make --jobs --output-sync lone
- name: Build lone's tools
run: make --jobs --output-sync tools
- name: Build lone's test suite
run: make --jobs --output-sync tests
- name: Test lone
run: make test
- name: Upload lone executable artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.compiler.name }}-${{ matrix.linker.name }}-lone
path: build/${{ matrix.compiler.name }}-${{ matrix.linker.name }}/lone
compression-level: 9
overwrite: false
analyze:
name: CodeQL analysis
runs-on: ubuntu-latest
container: archlinux:base-devel
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
steps:
- name: Set up pacman keys
run: pacman-key --init
- name: Update packages and install dependencies
run: pacman -Syu --noconfirm clang lld llvm mold
- name: Checkout lone repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Build lone
run: make
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"