-
Notifications
You must be signed in to change notification settings - Fork 165
171 lines (163 loc) · 5.14 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
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
name: Test
on: [push, pull_request]
jobs:
makefile-analysis:
name: makefile-analysis
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: "Install analysis tools"
run: |
sudo apt-get update
sudo apt-get install -y clang-tools valgrind
- name: Run tests
run: ./test/ci/analysis.sh
makefile-test:
name: makefile-${{ matrix.runner }}-amd64-${{ matrix.compiler }} ${{ ((matrix.openmp == 1) && '+openmp') || '' }}
needs: makefile-analysis
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: ["ubuntu-20.04"]
compiler: ["gcc", "clang"]
openmp: ["0", "1"]
include:
- runner: "macos-11"
compiler: "clang"
openmp: "0"
env:
OPENMP: ${{ matrix.openmp }}
OMP_NUM_THREADS: ${{ ((matrix.openmp == 1) && '2') || '0' }}
CC: ${{ matrix.compiler }}
OBJCOPY: ${{ (startsWith(matrix.runner, 'macos') && 'echo') || 'objcopy' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run tests
run: ./test/ci/test.sh
cmake-test:
name: cmake-${{ matrix.runner }}-${{ matrix.platform }}
needs: makefile-analysis
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: ["ubuntu-20.04", "macos-11", "windows-2019"]
platform: ["x86_64", "i686"]
exclude:
- runner: "macos-11"
platform: "i686"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Ubuntu i686 support
if: runner.os == 'Linux' && matrix.platform == 'i686'
run: |
sudo apt-get update
sudo apt-get install -y libc6-dev-i386
echo "CFLAGS=-m32" >> $GITHUB_ENV
echo "LDFLAGS=-m32" >> $GITHUB_ENV
- name: CMake Configure
run: >
cmake
-B out
-Werror=dev
-DBASE64_BUILD_TESTS=ON
${{ runner.os != 'Windows' && '-DCMAKE_BUILD_TYPE=Release' || '' }}
${{ runner.os == 'macOS' && '-DBASE64_WITH_AVX2=OFF' || '' }}
${{ runner.os == 'Windows' && matrix.platform == 'i686' && '-A Win32' || '' }}
-DBASE64_WITH_AVX512=OFF
- name: CMake Build
run: cmake --build out --config Release --verbose
- name: CTest
run: ctest --no-tests=error --test-dir out -VV --build-config Release
alpine-makefile-test:
name: makefile-alpine-amd64-gcc
needs: makefile-analysis
runs-on: ubuntu-latest
container:
image: alpine:3.12
env:
CC: gcc
steps:
- name: Install deps
run: apk add --update bash build-base git
- name: Checkout
uses: actions/checkout@v3
- name: Run tests
run: ./test/ci/test.sh
alpine-cmake-test:
name: cmake-alpine-amd64-gcc
needs: makefile-analysis
runs-on: ubuntu-latest
container:
image: alpine:3.12
steps:
- name: Install deps
run: apk add --update bash build-base cmake git
- name: Checkout
uses: actions/checkout@v3
- name: CMake Configure
run: >
cmake
-B out
-Werror=dev
-DBASE64_BUILD_TESTS=ON
-DBASE64_WITH_AVX512=OFF
-DCMAKE_BUILD_TYPE=Release
- name: CMake Build
run: cmake --build out --config Release --verbose
- name: CTest
run: ctest --no-tests=error -VV --build-config Release
working-directory: ./out
alpine-alt-arch-makefile-test:
name: makefile-alpine-${{matrix.arch}}-${{matrix.cc}}
needs: makefile-analysis
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [armv7, aarch64, s390x, ppc64le]
cc: [gcc, clang]
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@v2
with:
arch: ${{matrix.arch}}
distro: alpine_latest
env: |
CC: ${{matrix.cc}}
install: apk add --update bash build-base cmake git ${{matrix.cc}}
run: ./test/ci/test.sh
alpine-alt-arch-cmake-test:
name: cmake-alpine-${{matrix.arch}}-${{matrix.cc}}
needs: makefile-analysis
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [armv7, aarch64, s390x, ppc64le]
cc: [gcc, clang]
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@v2
with:
arch: ${{matrix.arch}}
distro: alpine_latest
env: |
CC: ${{matrix.cc}}
install: apk add --update bash build-base cmake git ${{matrix.cc}}
run: |
echo "::group::CMake Configure"
cmake -B out -Werror=dev -DBASE64_BUILD_TESTS=ON -DCMAKE_BUILD_TYPE=Release
echo "::endgroup::CMake Configure"
echo "::group::CMake Build"
cmake --build out --config Release --verbose
echo "::endgroup::CMake Build"
echo "::group::CTest"
ctest --no-tests=error --test-dir out -VV --build-config Release
echo "::endgroup::CTest"