@@ -2,7 +2,7 @@ name: Code Coverage
22
33on :
44 push :
5- tags :
5+ tags :
66 - ' v[0-9]+.[0-9]+.[0-9]+'
77 - ' v[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
88
@@ -21,21 +21,44 @@ jobs:
2121 steps :
2222 - uses : actions/checkout@v3
2323
24+ - name : Install Clang 17
25+ run : |
26+ # Exit on error
27+ set -e
28+ # Download and execute the LLVM installation script for the specified Clang version
29+ echo "-----> Downloading and executing the LLVM installation script for Clang 17"
30+ wget https://apt.llvm.org/llvm.sh
31+ chmod +x llvm.sh
32+ sudo ./llvm.sh 17
33+
34+ echo "-----> Installing libc++"
35+ sudo apt-get install -y libc++-17-dev libc++abi-17-dev libunwind-17 libunwind-17-dev libc6 libzstd1
36+
37+ # Update the symbolic link to point to the newly installed Clang version
38+ echo "-----> Updating the symbolic link to point to Clang 17"
39+ sudo rm -f /usr/bin/clang++
40+ sudo ln -s /usr/bin/clang++-17 /usr/bin/clang++
41+
42+ # Display the installation directory and version of the installed Clang
43+ echo "-----> Clang-17 was installed on:"
44+ which clang-17
45+ echo "-----> Clang++ was installed on:"
46+ which clang++-17
47+
2448 - name : Use nightly toolchain
2549 run : |
2650 rustup toolchain install nightly
2751 rustup override set nightly
28-
52+
2953 - name : Caching cargo dependencies
3054 id : project-cache
3155 uses : Swatinem/rust-cache@v2
32-
56+
3357 - if : ${{ steps.cache-cargo.outputs.cache-hit != 'true' }}
3458 name : Install grcov
3559 run : cargo install grcov
3660
3761 - name : Make the USER own the working directory
38- if : ${{ matrix.os == 'ubuntu-latest' }}
3962 run : sudo chown -R $USER:$USER ${{ github.workspace }}
4063
4164 - name : Run tests
5679 path : |
5780 ./zork++/target/debug/coverage/code_cov.xml
5881 ./zork++/target/debug/coverage/index.html
59-
82+
6083 - name : Publish coverage report to GitHub Pages
6184 uses : JamesIves/github-pages-deploy-action@v4
6285 with :
0 commit comments