Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,18 @@ jobs:
echo "CLING_HASH=$env:CLING_HASH" >> $GITHUB_ENV
echo "LLVM_HASH=$env:LLVM_HASH" >> $GITHUB_ENV

- name: Restore Cache LLVM/Clang runtime build directory
uses: actions/cache/restore@v4
id: cache
with:
path: |
llvm-project
${{ matrix.cling=='On' && 'cling' || '' }}
key: ${{ env.CLING_HASH }}-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}-clang-${{ matrix.clang-runtime }}.x-patch-${{ hashFiles(format('patches/llvm/clang{0}-*.patch', matrix.clang-runtime)) || 'none' }}
lookup-only: true

- name: Setup default Build Type on *nux
if: runner.os != 'windows'
if: ${{ runner.os != 'windows' && steps.cache.outputs.cache-hit != 'true' }}
run: |
echo "BUILD_TYPE=Release" >> $GITHUB_ENV
echo "CODE_COVERAGE=0" >> $GITHUB_ENV
Expand All @@ -198,15 +208,15 @@ jobs:
fi

- name: Setup default Build Type on Windows
if: runner.os == 'windows'
if: ${{ runner.os == 'windows' && steps.cache.outputs.cache-hit != 'true' }}
run: |
echo "BUILD_TYPE=Release" >> $env:GITHUB_ENV
echo "CODE_COVERAGE=0" >> $env:GITHUB_ENV
echo "ncpus=%NUMBER_OF_PROCESSORS%"
echo "ncpus=%NUMBER_OF_PROCESSORS%" >> $GITHUB_ENV

- name: Setup compiler on Linux
if: runner.os == 'Linux'
if: ${{ runner.os == 'Linux' && steps.cache.outputs.cache-hit != 'true' }}
run: |
# https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
vers="${compiler#*-}"
Expand All @@ -230,7 +240,7 @@ jobs:
compiler: ${{ matrix.compiler }}

- name: Setup compiler on macOS
if: runner.os == 'macOS'
if: ${{ runner.os == 'macOS' && steps.cache.outputs.cache-hit != 'true' }}
run: |
vers="${compiler#*-}"
if [[ "${{ matrix.compiler }}" == *"gcc"* ]]; then
Expand All @@ -251,7 +261,7 @@ jobs:
#Section slightly modified version of
#https://github.com/vgvassilev/clad/blob/40d8bec11bde47b14a281078183a4f6147abeac5/.github/workflows/ci.yml#L510C1-L534C10
- name: Setup compiler on Windows
if: runner.os == 'windows'
if: ${{ runner.os == 'windows' && steps.cache.outputs.cache-hit != 'true' }}
run: |
if ( "${{ matrix.compiler }}" -imatch "clang" )
{
Expand All @@ -274,21 +284,21 @@ jobs:
}

- name: Install deps on Windows
if: runner.os == 'windows'
if: ${{ runner.os == 'windows' && steps.cache.outputs.cache-hit != 'true' }}
run: |
choco install findutils
$env:PATH="C:\Program Files (x86)\GnuWin32\bin;$env:PATH"

- name: Install deps on Linux
if: runner.os == 'Linux'
if: ${{ runner.os == 'Linux' && steps.cache.outputs.cache-hit != 'true' }}
run: |
# Install deps
sudo apt-get update
sudo apt-get autoremove
sudo apt-get clean

- name: Install deps on MacOS
if: runner.os == 'macOS'
if: ${{ runner.os == 'macOS' && steps.cache.outputs.cache-hit != 'true' }}
run: |
brew update
brew remove ruby@3.0
Expand All @@ -299,15 +309,6 @@ jobs:
done
brew upgrade

- name: Restore Cache LLVM/Clang runtime build directory
uses: actions/cache/restore@v4
id: cache
with:
path: |
llvm-project
${{ matrix.cling=='On' && 'cling' || '' }}
key: ${{ env.CLING_HASH }}-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}-clang-${{ matrix.clang-runtime }}.x-patch-${{ hashFiles(format('patches/llvm/clang{0}-*.patch', matrix.clang-runtime)) || 'none' }}

- name: Build LLVM/Cling on Unix systems if the cache is invalid
if: ${{ runner.os != 'windows' && steps.cache.outputs.cache-hit != 'true' }}
run: |
Expand Down