@@ -131,18 +131,6 @@ jobs:
131131 git clone --depth=1 https://github.com/emscripten-core/emsdk.git
132132 ./emsdk/emsdk install ${{ matrix.emsdk_ver }}
133133
134- - name : Setup default Build Type on *nux
135- if : ${{ runner.os != 'windows' && steps.cache.outputs.cache-hit != 'true' }}
136- run : |
137- echo "BUILD_TYPE=Release" >> $GITHUB_ENV
138- echo "CODE_COVERAGE=0" >> $GITHUB_ENV
139- os="${{ matrix.os }}"
140- if [[ "${os}" == "macos"* ]]; then
141- echo "ncpus=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
142- else
143- echo "ncpus=$(nproc --all)" >> $GITHUB_ENV
144- fi
145-
146134 - name : Setup default Build Type on Windows
147135 if : ${{ runner.os == 'windows' && steps.cache.outputs.cache-hit != 'true' }}
148136 run : |
@@ -151,97 +139,12 @@ jobs:
151139 $env:ncpus=$([Environment]::ProcessorCount)
152140 echo "ncpus=$env:ncpus" >> $env:GITHUB_ENV
153141
154- - name : Setup compiler on Linux
155- if : ${{ runner.os == 'Linux' && steps.cache.outputs.cache-hit != 'true' }}
156- run : |
157- # https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
158- vers="${compiler#*-}"
159- os_codename="`cat /etc/os-release | grep UBUNTU_CODENAME | cut -d = -f 2`"
160- ##sudo apt update
161- if [[ "${{ matrix.compiler }}" == *"gcc"* ]]; then
162- sudo apt install -y gcc-${vers} g++-${vers} lld
163- echo "CC=gcc-${vers}" >> $GITHUB_ENV
164- echo "CXX=g++-${vers}" >> $GITHUB_ENV
165- else
166- if ! sudo apt install -y clang-${vers}; then
167- curl https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
168- echo "deb https://apt.llvm.org/${os_codename}/ llvm-toolchain-${os_codename}-${vers} main" | sudo tee -a /etc/apt/sources.list
169- sudo apt-get update
170- sudo apt-get install -y clang-${vers}
171- fi
172- echo "CC=clang-${vers}" >> $GITHUB_ENV
173- echo "CXX=clang++-${vers}" >> $GITHUB_ENV
174- fi
175- env :
176- compiler : ${{ matrix.compiler }}
177-
178- - name : Setup compiler on macOS
179- if : ${{ runner.os == 'macOS' && steps.cache.outputs.cache-hit != 'true' }}
180- run : |
181- vers="${compiler#*-}"
182- if [[ "${{ matrix.compiler }}" == *"gcc"* ]]; then
183- brew install "gcc@$vers"
184- echo "CC=gcc-${vers}" >> $GITHUB_ENV
185- echo "CXX=g++-${vers}" >> $GITHUB_ENV
186- else
187- export ARCHITECHURE=$(uname -m)
188- if [[ "$ARCHITECHURE" == "arm64" ]]; then
189- cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
190- if [[ "${cling_on}" == "ON" ]]; then
191- brew install llvm@15
192- brew remove llvm@18
193- brew cleanup
194- #FIXME: Do not believe setting all these environment variables are necessary
195- # They were set to avoid using Xcodes libc++ and to stop CppInterOp using llvm@18 in tests
196- echo 'LDFLAGS="-L/opt/homebrew/opt/llvm@15/lib/ -L/opt/homebrew/opt/llvm@15/c++/"' >> $GITHUB_ENV
197- echo 'CPPFLAGS="-I/opt/homebrew/opt/llvm@15/include"' >> $GITHUB_ENV
198- echo 'CPATH="/opt/homebrew/include/"' >> $GITHUB_ENV
199- echo 'LIBRARY_PATH="/opt/homebrew/lib/"' >> $GITHUB_ENV
200- echo "CC=$(brew --prefix llvm@15)/bin/clang" >> $GITHUB_ENV
201- echo "CXX=$(brew --prefix llvm@15)/bin/clang++" >> $GITHUB_ENV
202- else
203- echo "CC=$(brew --prefix llvm@18)/bin/clang" >> $GITHUB_ENV
204- echo "CXX=$(brew --prefix llvm@18)/bin/clang++" >> $GITHUB_ENV
205- fi
206- else
207- echo "CC=$(brew --prefix llvm@15)/bin/clang" >> $GITHUB_ENV
208- echo "CXX=$(brew --prefix llvm@15)/bin/clang++" >> $GITHUB_ENV
209- fi
210- fi
211- echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV
212- env :
213- compiler : ${{ matrix.compiler }}
214-
215- # Section slightly modified version of
216- # https://github.com/vgvassilev/clad/blob/40d8bec11bde47b14a281078183a4f6147abeac5/.github/workflows/ci.yml#L510C1-L534C10
217- - name : Setup compiler on Windows
218- if : ${{ runner.os == 'windows' && steps.cache.outputs.cache-hit != 'true' }}
219- run : |
220- if ( "${{ matrix.compiler }}" -imatch "clang" )
221- {
222- $ver="${{ matrix.compiler }}".split("-")[1]
223- choco install llvm --version=$ver --no-progress -my
224- clang --version
225- #
226- $env:CC="clang"
227- $env:CXX="clang++"
228- echo "CC=clang" >> $env:GITHUB_ENV
229- echo "CXX=clang++" >> $env:GITHUB_ENV
230- }
231- elseif ( "${{ matrix.compiler }}" -imatch "msvc" )
232- {
233- # MSVC is builtin in container image
234- }
235- else
236- {
237- echo "Unsupported compiler - fix YAML file"
238- }
239-
240142 - name : Install deps on Windows
241143 if : ${{ runner.os == 'windows' && steps.cache.outputs.cache-hit != 'true' }}
242144 run : |
243- choco install findutils
145+ choco install findutils ninja
244146 $env:PATH="C:\Program Files (x86)\GnuWin32\bin;$env:PATH"
147+ $env:PATH="C:\Program Files (x86)\Ninja\bin;$env:PATH"
245148
246149 - name : Install deps on MacOS
247150 if : ${{ runner.os == 'macOS' && steps.cache.outputs.cache-hit != 'true' }}
@@ -256,9 +159,7 @@ jobs:
256159 brew unlink "$pkg"
257160 brew link --overwrite "$pkg"
258161 done
259- brew upgrade openssl >/dev/null 2>&1
260162 brew install ninja
261- brew upgrade
262163
263164 - name : Install deps on Linux
264165 if : ${{ runner.os == 'Linux' && steps.cache.outputs.cache-hit != 'true' }}
0 commit comments