-
Notifications
You must be signed in to change notification settings - Fork 5
180 lines (170 loc) · 5.1 KB
/
patmos-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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
name: Patmos CI
on:
push:
branches: '**'
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-**'
pull_request:
schedule:
# Run every monday at 1:00 AM
- cron: '00 1 * * MON'
env:
CARGO_TERM_COLOR: always
J: -j2
BUILD_PATH: build
INSTALL_PATH: build/local
LLVM_PATH: llvm
CLANG_PATH: clang
COMPILER_RT_PATH: compiler-rt
COMPILER_RT_BUILD_PATH: build-compiler-rt
NEWLIB_PATH: patmos-newlib
NEWLIB_BUILD_PATH: build-newlib
BENCH_PATH: patmos-benchmarks
BENCH_BUILD_PATH: build-bench
CET_TESTS_PATH: patmos-cet-test-suite
LLD_PATH: lld
jobs:
test-non-patmos:
name: Test Non-Patmos
runs-on: ubuntu-latest
strategy:
fail-fast: false
env:
CC: gcc
CXX: g++
steps:
- uses: actions/checkout@v2
- name: Build and Run LLVM Unit and Regression Tests
uses: ./.github/actions/build-test-all
with:
targets: X86
enable-assertions: true
# Exclude known failing tests
exclude-reg: "(Clang :: Lexer/case-insensitive-include.c)|(Clang :: Lexer/case-insensitive-system-include.c)|(Clang :: Modules/inferred-framework-case.m)|(Clang :: Preprocessor/nonportable-include-with-hmap.c)"
include-only: "."
default-target: x86_64-unknown-linux-gnu
compiler-rt-tests: 'X86_64LinuxConfig'
enable-package: false
- name: Finalize LLVM Build
working-directory: ${{env.BUILD_PATH}}
run: make $J llc llvm-link clang llvm-config llvm-objdump opt
package-patmos:
name: Build, Test, and Package (${{matrix.platform}})
runs-on: ${{matrix.platform}}
strategy:
fail-fast: false
matrix:
include:
#- platform: ubuntu-latest
# cc: gcc
# cxx: g++
- platform: ubuntu-22.04
cc: gcc
cxx: g++
- platform: ubuntu-20.04
cc: gcc
cxx: g++
#- platform: macos-latest # ARM
# cc: clang
# cxx: clang++
#- platform: macos-14 # ARM
# cc: clang
# cxx: clang++
#- platform: macos-13 # x86
# cc: clang
# cxx: clang++
- platform: macos-12 # x86
cc: clang
cxx: clang++
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-dependencies
- name: Build and Run LLVM Unit and Regression Tests
uses: ./.github/actions/build-test-all
with:
enable-assertions: true
artifact-name: package-${{matrix.platform}}
test-benchmarks:
name: Test Benchmarks (${{matrix.platform}})
runs-on: ${{matrix.platform}}
strategy:
fail-fast: false
matrix:
include:
#- platform: ubuntu-latest
# cc: gcc
# cxx: g++
- platform: ubuntu-22.04
cc: gcc
cxx: g++
- platform: ubuntu-20.04
cc: gcc
cxx: g++
#- platform: macos-latest # ARM
# cc: clang
# cxx: clang++
#- platform: macos-14 # ARM
# cc: clang
# cxx: clang++
#- platform: macos-13 # x86
# cc: clang
# cxx: clang++
- platform: macos-12 # x86
cc: clang
cxx: clang++
needs: [package-patmos]
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-dependencies
- name: Build and Run LLVM Unit and Regression Tests
uses: ./.github/actions/test-benchmarks
with:
artifact-name: package-${{matrix.platform}}
release:
name: Release (${{matrix.platform}})
runs-on: ${{matrix.platform}}
permissions:
contents: write
strategy:
fail-fast: true
matrix:
include:
- platform: ubuntu-20.04
cc: gcc
cxx: g++
#- platform: macos-14
# cc: clang
# cxx: clang++
- platform: macos-12
cc: clang
cxx: clang++
# Run after the test jobs finish
needs: [package-patmos, test-benchmarks, test-non-patmos]
# Run only if this was triggered by a tag
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
env:
RELEASE_TAR: patmos-llvm*.tar.gz
PATMOS_TRIPLE: patmos-unknown-unknown-elf
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/install-dependencies
- name: Build LLVM, Compiler-RT, Newlib, and Package
uses: ./.github/actions/build-test-all
with:
# Compiler currently doesn't work without assertions enabled
enable-assertions: true
enable-tests: false
artifact-name: package-${{matrix.platform}}
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: ${{env.BUILD_PATH}}/patmos-unknown-unknown-elf/package-temp/patmos-llvm-*.tar.gz