-
-
Notifications
You must be signed in to change notification settings - Fork 13
176 lines (176 loc) · 6.34 KB
/
dev-daily.yml
File metadata and controls
176 lines (176 loc) · 6.34 KB
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
name: Daily
on:
schedule:
- cron: "0 5 * * *"
workflow_dispatch:
env:
SP_TIME: ""
ARTIFACT: ""
permissions:
id-token: write
jobs:
check-latest:
runs-on: ubuntu-slim
outputs:
cache-hit: ${{ steps.cache.outputs.cache-hit }}
steps:
- name: Commit
id: commit
run: |
head=$(git ls-remote https://github.com/TLCFEM/suanPan.git HEAD | awk '{print $1}')
echo "head=$head" >> $GITHUB_OUTPUT
echo "$head" > .commit
- name: Cache
id: cache
uses: actions/cache@v5
with:
path: .commit
key: commit-${{ steps.commit.outputs.head }}
linux-daily:
runs-on: ubuntu-24.04
needs: check-latest
if: needs.check-latest.outputs.cache-hit != 'true'
timeout-minutes: 120
steps:
- name: Clone
uses: actions/checkout@v6
with:
submodules: recursive
- name: Compile
run: |
sudo apt-get install patchelf lcov
echo "SP_TIME=$(date +''%y%m%d'')" >> $GITHUB_ENV
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=build/dist \
-DSP_ENABLE_ASAN=ON \
-DSP_ENABLE_CODECOV=ON \
-DSP_ENABLE_AVX2=OFF
cmake --build build --target install --config Debug -j $(nproc)
./Script/linux-patcher.sh ./build/dist/bin/suanPan
- name: Cosign
uses: sigstore/gh-action-sigstore-python@v3.3.0
with:
inputs: build/dist/bin/*
- name: Pack
run: |
file_name="suanPan-linux-debug-openblas-${{ env.SP_TIME }}.tar.gz"
echo "ARTIFACT=$file_name" >> "$GITHUB_ENV"
tar czf $file_name -C build/dist .
export LD_LIBRARY_PATH=/home/runner/work/suanPan/suanPan/build/dist/lib
./build/dist/bin/suanPan -v
- name: Remote
run: |
echo "${{ secrets.STATIC_KEY }}" > key.pem
chmod 600 key.pem
scp -i key.pem -o StrictHostKeyChecking=no ${{ env.ARTIFACT }} ${{ secrets.STATIC_HOST }}:~/Documents/fleet/hub/suanpan/linux/
rm -f key.pem
macos-daily:
runs-on: ${{ matrix.os }}
needs: check-latest
if: needs.check-latest.outputs.cache-hit != 'true'
timeout-minutes: 100
strategy:
matrix:
os: [macos-14-large, macos-14-xlarge]
steps:
- name: Clone
uses: actions/checkout@v6
with:
submodules: recursive
- name: Compile
run: |
echo "SP_TIME=$(date +''%y%m%d'')" >> $GITHUB_ENV
brew install glfw glew libomp
./Script/mac-dependency.sh ${{ matrix.os }}
export CC=gcc-13 && export CXX=g++-13 && export FC=gfortran-13
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_PREFIX_PATH="$(brew --prefix gcc@13)" \
-DSP_ENABLE_AVX2=OFF \
-DCMAKE_INSTALL_PREFIX=build/dist
cmake --build build --target install --config Debug -j 3
./Script/mac-patcher.sh build/dist
- name: Cosign
uses: sigstore/gh-action-sigstore-python@v3.3.0
with:
inputs: build/dist/bin/*
- name: Pack
run: |
file_name="suanPan-${{ matrix.os }}"
file_name="${file_name//xlarge/arm64}"
file_name="${file_name//large/amd64}"
file_name+="-debug-gcc-${{ env.SP_TIME }}.tar.gz"
echo "ARTIFACT=$file_name" >> "$GITHUB_ENV"
tar czf $file_name -C build/dist .
./build/dist/bin/suanPan -v
- name: Remote
run: |
echo "${{ secrets.STATIC_KEY }}" > key.pem
chmod 600 key.pem
scp -i key.pem -o StrictHostKeyChecking=no ${{ env.ARTIFACT }} ${{ secrets.STATIC_HOST }}:~/Documents/fleet/hub/suanpan/macos/
rm -f key.pem
windows-gcc-daily:
runs-on: windows-2025
needs: check-latest
if: needs.check-latest.outputs.cache-hit != 'true'
timeout-minutes: 100
steps:
- name: Clone
uses: actions/checkout@v6
with:
submodules: recursive
- name: GCC
run: |
C:/msys64/usr/bin/wget.exe -q https://github.com/brechtsanders/winlibs_mingw/releases/download/13.3.0posix-11.0.1-ucrt-r1/winlibs-x86_64-posix-seh-gcc-13.3.0-mingw-w64ucrt-11.0.1-r1.7z
7z x winlibs-x86_64-posix-seh-gcc-13.3.0-mingw-w64ucrt-11.0.1-r1.7z
- name: Compile
run: |
"SP_TIME=$(Get-Date -Format 'yyMMdd')" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
cmake -G "MinGW Makefiles" -S . -B build `
-DCMAKE_BUILD_TYPE=Debug `
-DCMAKE_C_COMPILER=D:/a/suanPan/suanPan/mingw64/bin/gcc.exe `
-DCMAKE_CXX_COMPILER=D:/a/suanPan/suanPan/mingw64/bin/g++.exe `
-DCMAKE_Fortran_COMPILER=D:/a/suanPan/suanPan/mingw64/bin/gfortran.exe `
-DCMAKE_INSTALL_PREFIX=build/dist `
-DSP_ENABLE_AVX2=OFF
cmake --build build --target install --config Debug -j 4
- name: Name
shell: bash
run: |
echo "ARTIFACT=suanPan-win-gcc-debug-openblas-${{ env.SP_TIME }}.zip" >> "$GITHUB_ENV"
./Script/win-patcher.sh build/dist/bin/suanPan.exe
- name: Cosign
uses: sigstore/gh-action-sigstore-python@v3.3.0
with:
inputs: build/dist/bin/*.exe
- name: Unsigned
id: upload-unsigned-vs
uses: actions/upload-artifact@v7
with:
name: unsigned-${{ env.ARTIFACT }}
path: build/dist/bin/*.exe
- name: Sign
uses: signpath/github-action-submit-signing-request@v2
if: false
with:
api-token: ${{ secrets.SIGNPATH }}
organization-id: b04bac88-d6e9-4140-948d-cb95e3095cbe
project-slug: suanPan
signing-policy-slug: test-signing
artifact-configuration-slug: test
github-artifact-id: ${{ steps.upload-unsigned-vs.outputs.artifact-id }}
wait-for-completion: true
output-artifact-directory: build/dist/bin
- name: Test
run: |
cd build/dist/bin
7z a -tzip ../../../${{ env.ARTIFACT }} ./*
./suanPan.exe -v
- name: Remote
shell: bash
run: |
echo "${{ secrets.STATIC_KEY }}" > key.pem
chmod 600 key.pem
scp -i key.pem -o StrictHostKeyChecking=no ${{ env.ARTIFACT }} ${{ secrets.STATIC_HOST }}:~/Documents/fleet/hub/suanpan/windows/
rm -f key.pem