-
Notifications
You must be signed in to change notification settings - Fork 43
107 lines (100 loc) · 3.48 KB
/
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
name: CI
on:
push:
pull_request:
schedule:
- cron: '0 0 1 * *'
jobs:
Linux:
name: Linux
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04]
cxx: [g++, clang++]
fail-fast: false
env:
CXX: ${{ matrix.cxx }}
steps:
- uses: actions/checkout@v4
- name: Install
run: |
sudo apt-get update -y
sudo apt-get install -y cppcheck ocl-icd-opencl-dev pocl-opencl-icd
$CXX --version
- name: Script
run: |
make prpll -O -j "$(nproc)"
cd build-release
rm -f -- *.o
./prpll -h
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.os }}_${{ matrix.cxx }}_prpll
path: ${{ github.workspace }}
- name: Cppcheck
run: cppcheck --enable=all --force .
- name: Clang-Tidy
if: ${{ matrix.cxx == 'clang++' }}
run: clang-tidy -checks='bugprone-*,-bugprone-reserved-identifier,cert-*,-cert-dcl37-c,-cert-dcl51-cpp,clang-analyzer-*,concurrency-*,misc-*,-misc-no-recursion,modernize-*,-modernize-use-trailing-return-type,performance-*,portability-*,readability-const-return-type,readability-container-*,readability-duplicate-include,readability-else-after-return,readability-make-member-function-cons,readability-non-const-parameter,readability-redundant-*,readability-simplify-*,readability-string-compare,readability-use-*' -header-filter='.*' src/*.cpp -- -Wall -O3 -std=gnu++20
continue-on-error: true
- name: ShellCheck
run: shopt -s globstar; shellcheck -o avoid-nullary-conditions,check-extra-masked-returns,check-set-e-suppressed,deprecate-which,quote-safe-variables,require-double-brackets -s bash **/*.sh
continue-on-error: true
Windows:
name: Windows
runs-on: windows-latest
strategy:
matrix:
cxx: [g++, clang++]
fail-fast: false
env:
CXX: ${{ matrix.cxx }}
steps:
- uses: actions/checkout@v4
- name: Before Install
run: |
echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "C:\msys64\usr\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo "CPPFLAGS=-IC:\msys64\mingw64\include" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "LIBPATH=-LC:\msys64\mingw64\lib" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Install
run: |
pacman -S --noconfirm mingw-w64-x86_64-gmp mingw-w64-x86_64-opencl-icd
& $env:CXX --version
- name: Install Clang
if: ${{ matrix.cxx == 'clang++' }}
run: |
pacman -S --noconfirm mingw-w64-x86_64-clang
& $env:CXX --version
- name: Script
run: | # Cannot use `make exe`, as the OpenCL ICD Loader does not support static linking
make prpll -O -j $env:NUMBER_OF_PROCESSORS
cd build-release
rm *.o
.\prpll.exe -h
- uses: actions/upload-artifact@v4
if: always()
with:
name: win_${{ matrix.cxx }}_prpll
path: ${{ github.workspace }}
macOS:
name: macOS
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- name: Install
run: |
brew install gcc@14
- name: Script
run: |
make prpll -j "$(sysctl -n hw.ncpu)"
cd build-release
rm -f -- *.o
./prpll -h
- uses: actions/upload-artifact@v4
if: always()
with:
name: macos_prpll
path: ${{ github.workspace }}