@@ -2,17 +2,12 @@ name: Build
22
33on :
44 push :
5- branches :
6- - main
7- - hackathon/dev
5+ branches : [main]
86 pull_request :
9- branches :
10- - main
11- - hackathon/dev
127
138env :
149 CTEST_OUTPUT_ON_FAILURE : ON
15- CTEST_PARALLEL_LEVEL : 2
10+ CTEST_PARALLEL_LEVEL : 1
1611
1712jobs :
1813 # ###################
2116
2217 Linux :
2318 name : ${{ matrix.name }} (${{ matrix.config }})
24- runs-on : [self-hosted,Linux]
25- # runs-on: ${{ matrix.os }}
19+ runs-on : ${{ matrix.os }}
2620 strategy :
2721 fail-fast : false
2822 matrix :
@@ -33,25 +27,27 @@ jobs:
3327 name : Linux
3428 steps :
3529 - name : Checkout repository
36- uses : actions/checkout@v1
30+ uses : actions/checkout@v4.1.6
3731 with :
3832 fetch-depth : 10
3933
4034 - name : Dependencies
4135 run : |
42- echo 'CACHE_PATH=~/.ccache' >> "$GITHUB_ENV"
36+ sudo apt-get update
37+ sudo apt-get -o Acquire::Retries=3 install ccache
38+ echo 'CACHE_PATH=~/.cache/ccache' >> "$GITHUB_ENV"
4339
4440 - name : Cache Build
4541 id : cache-build
46- uses : actions/cache@v2
42+ uses : actions/cache@v4
4743 with :
4844 path : ${{ env.CACHE_PATH }}
49- key : ${{ runner.os }}-${{ matrix.config }}-${{ matrix.tbb }}- cache-${{ github.sha }}
50- restore-keys : ${{ runner.os }}-${{ matrix.config }}-${{ matrix.tbb }}- cache
45+ key : ${{ runner.os }}-${{ matrix.config }}-cache-${{ github.sha }}
46+ restore-keys : ${{ runner.os }}-${{ matrix.config }}-cache
5147
5248 - name : Prepare ccache
5349 run : |
54- ccache --max-size=20.0G
50+ # ccache --max-size=20.0G
5551 ccache -V && ccache --show-stats && ccache --zero-stats
5652
5753 - name : Configure
6359 -DCMAKE_BUILD_TYPE=${{ matrix.config }}
6460
6561 - name : Build
66- run : cd build; make -j8 ; ccache --show-stats
62+ run : cd build; make -j2 ; ccache --show-stats
6763
6864 - name : Tests
6965 run : cd build; ctest --verbose --output-on-failure
@@ -73,40 +69,36 @@ jobs:
7369 # ###################
7470
7571 MacOS :
76- name : ${{ matrix.name }}-${{ matrix.arch }} (${{ matrix.config }})
77- # runs-on: ${{ matrix.os }}
78- runs-on : [self-hosted, MacOS]
72+ name : ${{ matrix.os }} (${{ matrix.config }})
73+ runs-on : ${{ matrix.os }}
7974 strategy :
8075 fail-fast : false
8176 matrix :
82- os : [macos-latest]
83- arch : [arm64] # arm64 no arm as GMP is binary
77+ os : [macos-latest, macos-14]
8478 config : [Debug, Release]
85- include :
86- - os : macos-latest
87- name : macOS
8879
8980 steps :
9081 - name : Checkout repository
91- uses : actions/checkout@v1
82+ uses : actions/checkout@v4.1.6
9283 with :
9384 fetch-depth : 10
9485
9586 - name : Dependencies
9687 run : |
88+ brew install ccache
9789 echo 'CACHE_PATH=~/Library/Caches/ccache' >> "$GITHUB_ENV"
9890
9991 - name : Cache Build
10092 id : cache-build
101- uses : actions/cache@v2
93+ uses : actions/cache@v4
10294 with :
10395 path : ${{ env.CACHE_PATH }}
104- key : ${{ runner .os }}-${{ matrix.config }}-${{ matrix.arch }}-${{ matrix.tbb }}-cache-${{ github.sha }}
105- restore-keys : ${{ runner .os }}-${{ matrix.config }}-${{ matrix.arch }}-${{ matrix.tbb }}-cache
96+ key : ${{ matrix .os }}-${{ matrix.config }}-cache-${{ github.sha }}
97+ restore-keys : ${{ matrix .os }}-${{ matrix.config }}-cache
10698
10799 - name : Prepare ccache
108100 run : |
109- ccache --max-size=20.0G
101+ # ccache --max-size=20.0G
110102 ccache -V && ccache --show-stats && ccache --zero-stats
111103
112104 - name : Configure
@@ -115,14 +107,12 @@ jobs:
115107 cd build
116108 cmake .. \
117109 -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
118- -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \
119110 -DCMAKE_BUILD_TYPE=${{ matrix.config }}
120111
121112 - name : Build
122- run : cd build; make -j8 ; ccache --show-stats
113+ run : cd build; make -j2 ; ccache --show-stats
123114
124115 - name : Tests
125- # if: matrix.arch == 'x86_64' # no ARM vm on actions yet
126116 run : cd build; ctest --verbose --output-on-failure
127117
128118 # ###################
@@ -131,35 +121,60 @@ jobs:
131121
132122 Windows :
133123 name : Windows (${{ matrix.config }})
134- runs-on : [self-hosted, Windows]
135- # runs-on: windows-2022
124+ runs-on : windows-2022
136125 env :
137- CC : cl.exe
138- CXX : cl.exe
139126 SCCACHE_IDLE_TIMEOUT : " 12000"
140127 strategy :
141128 fail-fast : false
142129 matrix :
143130 config : [Debug, Release]
131+
144132 steps :
145133 - name : Checkout repository
146- uses : actions/checkout@v1
134+ uses : actions/checkout@v4.1.6
147135 with :
148136 fetch-depth : 10
149-
150- - name : Configure and build
137+
138+ - name : Install Ninja
139+ uses : seanmiddleditch/gha-setup-ninja@master
140+
141+ - name : Dependencies
142+ run : |
143+ choco install -y sccache
144+ "SCCACHE_DIR=${env:LOCALAPPDATA}\Mozilla\sccache" | Out-File -FilePath $env:GITHUB_ENV -Append
145+
146+ - name : Cache build
147+ id : cache-build
148+ uses : actions/cache@v4
149+ with :
150+ path : ${{ env.SCCACHE_DIR }}
151+ key : ${{ runner.os }}-${{ matrix.config }}-cache-${{ github.sha }}
152+ restore-keys : ${{ runner.os }}-${{ matrix.config }}-cache
153+
154+ - name : Prepare sccache
155+ run : |
156+ sccache --max-size=1.0G
157+ sccache -V && sccache --show-stats && sccache --zero-stats
158+
159+ - name : Configure
151160 shell : cmd
152161 run : |
153- call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" -arch=x64
154- cmake --version
162+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
155163 cmake -G Ninja ^
164+ -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ^
165+ -DCMAKE_POLICY_DEFAULT_CMP0141=NEW ^
166+ -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=Embedded ^
156167 -DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
157168 -B build ^
158169 -S .
159- cd build
160- ninja -j8
170+
171+ - name : Build
172+ shell : cmd
173+ run : |
174+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
175+ cmake --build build -j2 && sccache --show-stats
161176
162177 - name : Tests
163178 run : |
164179 cd build
165- ctest --verbose --output-on-failure
180+ ctest --verbose --output-on-failure
0 commit comments