@@ -2,11 +2,8 @@ name: Build
22
33on :
44 push :
5- branches :
6- - main
5+ branches : [main]
76 pull_request :
8- branches :
9- - main
107
118env :
129 CTEST_OUTPUT_ON_FAILURE : ON
@@ -23,35 +20,36 @@ jobs:
2320 strategy :
2421 fail-fast : false
2522 matrix :
26- os : [ubuntu-18.04, ubuntu-20.04 , macos-latest]
23+ os : [ubuntu-latest , macos-latest]
2724 config : [Debug, Release]
2825 include :
2926 - os : macos-latest
3027 name : macOS
31- - os : ubuntu-18.04
32- name : Linux
33- - os : ubuntu-20.04
28+ - os : ubuntu-latest
3429 name : Linux
3530 steps :
3631 - name : Checkout repository
37- uses : actions/checkout@v1
32+ uses : actions/checkout@v2.5.0
3833 with :
3934 fetch-depth : 10
4035
4136 - name : Dependencies (Linux)
4237 if : runner.os == 'Linux'
4338 run : |
44- sudo apt-get install ccache
39+ sudo apt-get install ccache
40+ echo 'CACHE_PATH=~/.cache/ccache' >> "$GITHUB_ENV"
4541
4642 - name : Dependencies (macOS)
4743 if : runner.os == 'macOS'
48- run : brew install ccache
44+ run : |
45+ brew install ccache
46+ echo 'CACHE_PATH=~/Library/Caches/ccache' >> "$GITHUB_ENV"
4947
5048 - name : Cache Build
5149 id : cache-build
52- uses : actions/cache@v1
50+ uses : actions/cache@v3.0.11
5351 with :
54- path : ~/.ccache
52+ path : ${{ env.CACHE_PATH }}
5553 key : ${{ runner.os }}-${{ matrix.config }}-cache
5654
5755 - name : Prepare ccache
6563 cd build
6664 cmake .. \
6765 -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
66+ -DSIMPLE_BVH_WITH_UNIT_TESTS=ON \
6867 -DCMAKE_BUILD_TYPE=${{ matrix.config }}
6968
7069 - name : Build
@@ -79,54 +78,49 @@ jobs:
7978
8079 Windows :
8180 runs-on : windows-latest
82- env :
83- CC : cl.exe
84- CXX : cl.exe
8581 strategy :
8682 fail-fast : false
8783 matrix :
8884 config : [Debug, Release]
8985 steps :
9086 - name : Checkout repository
91- uses : actions/checkout@v1
87+ uses : actions/checkout@v2.5.0
9288 with :
9389 fetch-depth : 10
94- - uses : seanmiddleditch/gha-setup-ninja@master
9590
96- # https://github.com/actions/cache/issues/101
97- - name : Set env
91+ - name : Install Ninja
92+ uses : seanmiddleditch/gha-setup-ninja@master
93+
94+ - name : Set env variable for sccache
9895 run : |
9996 echo "appdata=$env:LOCALAPPDATA" >> ${env:GITHUB_ENV}
10097
10198 - name : Cache build
10299 id : cache-build
103- uses : actions/cache@v1
100+ uses : actions/cache@v3.0.11
104101 with :
105102 path : ${{ env.appdata }}\Mozilla\sccache
106103 key : ${{ runner.os }}-${{ matrix.config }}-cache
107104
108105 - name : Prepare sccache
109106 run : |
110- Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
107+ iwr -useb 'https://raw.githubusercontent.com/scoopinstaller/install/master/install.ps1' -outfile 'install.ps1'
108+ .\install.ps1 -RunAsAdmin
111109 scoop install sccache --global
112110 # Scoop modifies the PATH so we make it available for the next steps of the job
113111 echo "${env:PATH}" >> ${env:GITHUB_PATH}
114112
115- # We run configure + build in the same step, since they both need to call VsDevCmd
116- # Also, cmd uses ^ to break commands into multiple lines (in powershell this is `)
117113 - name : Configure and build
118114 shell : cmd
119115 run : |
120- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
121- cmake --version
116+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=x64
122117 cmake -G Ninja ^
123118 -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ^
124119 -DCMAKE_BUILD_TYPE=${{ matrix.config }} ^
125- -DRIGID_IPC_WITH_UNIT_TESTS =ON ^
120+ -DSIMPLE_BVH_WITH_UNIT_TESTS =ON ^
126121 -B build ^
127122 -S .
128- cd build
129- ninja -j1
123+ cmake --build build -j1
130124
131125 - name : Tests
132- run : cd build; ctest --verbose
126+ run : cd build; ctest --verbose -j2
0 commit comments