Skip to content

Commit

Permalink
test: fix ci jobs to use cached repo
Browse files Browse the repository at this point in the history
  • Loading branch information
kumarak committed Sep 2, 2024
1 parent 131af5b commit 6b69755
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
jobs:
build:
strategy:
matrix:
matrix: &build_matrix
llvm-version: [18]
image-version: [22.04]
build-type: [Release, Debug]
Expand All @@ -35,7 +35,7 @@ jobs:
image:
ghcr.io/lifting-bits/patchestry-ubuntu-${{ matrix.image-version }}-llvm-${{ matrix.llvm-version }}-dev:latest

env:
env: &build_env
CMAKE_PREFIX_PATH: "/usr/lib/llvm-${{ matrix.llvm-version }}/lib/cmake/mlir/;/usr/lib/llvm-${{ matrix.llvm-version }}/lib/cmake/clang/"
LLVM_EXTERNAL_LIT: "/usr/local/bin/lit"
ENABLE_SANITIZER_UNDEFINED_BEHAVIOR: ${{ matrix.sanitizers }}
Expand All @@ -48,6 +48,12 @@ jobs:
submodules: true
fetch-depth: 1

- name: Cache repository
uses: actions/cache@v3
with:
path: ${{ github.workspace }}
key: ${{ runner.os }}-repo-${{ github.sha }}

- name: Configure build - sanitizers ${{ matrix.sanitizers }}
run: cmake --preset ci

Expand All @@ -62,26 +68,16 @@ jobs:
test:
needs: build
strategy:
matrix:
llvm-version: [18]
image-version: [22.04]
build-type: [Release, Debug]
sanitizers: [ON, OFF]

matrix: *build_matrix
runs-on: ubuntu-${{ matrix.image-version }}

env:
CMAKE_PREFIX_PATH: "/usr/lib/llvm-${{ matrix.llvm-version }}/lib/cmake/mlir/;/usr/lib/llvm-${{ matrix.llvm-version }}/lib/cmake/clang/"
LLVM_EXTERNAL_LIT: "/usr/local/bin/lit"
ENABLE_SANITIZER_UNDEFINED_BEHAVIOR: ${{ matrix.sanitizers }}
ENABLE_SANITIZER_ADDRESS: ${{ matrix.sanitizers }}
env: *build_env

steps:
- name: Clone the Patchestry repository
uses: actions/checkout@v4
- name: Restore cached repository
uses: actions/cache@v3
with:
submodules: true
fetch-depth: 1
path: ${{ github.workspace }}
key: ${{ runner.os }}-repo-${{ github.sha }}

- name: Install CTest dependencies
run: |
Expand Down

0 comments on commit 6b69755

Please sign in to comment.