From c01ce6be3426431d27aba00c455d2e569dca31e0 Mon Sep 17 00:00:00 2001 From: davidebaroffio-polimi Date: Mon, 21 Jul 2025 09:07:39 +0200 Subject: [PATCH 1/3] CI workflow for testing --- .github/workflows/main.yml | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d558b28..2ea1408 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,4 +37,29 @@ jobs: mkdir build cmake -B build -DLLVM_DIR=/mnt/build/lib/cmake/llvm/ cmake --build build - + - name: Cache LLVM build + uses: actions/cache@v4 + with: + path: /mnt/build/ + key: llvm-build-${{ hashFiles('llvm-project/**', 'ASPIS/CMakeLists.txt') }} + restore-keys: | + llvm-build- + + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: pip-${{ hashFiles('ASPIS/testing/requirements.txt') }} + restore-keys: | + pip- + - name: Install Python requirements + shell: bash + working-directory: ./ASPIS/testing + run: | + pip install -r requirements.txt + - name: Testing ASPIS + shell: bash + working-directory: ./ASPIS/testing + run: | + pytest test.py -n auto + From ff604452ed499194f298722690c9db5fb356df9e Mon Sep 17 00:00:00 2001 From: davidebaroffio-polimi Date: Mon, 21 Jul 2025 11:13:10 +0200 Subject: [PATCH 2/3] Fixed cache and removed -n from pytest --- .github/workflows/main.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2ea1408..94a3720 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,6 +8,13 @@ jobs: uses: actions/checkout@v4 with: path: ASPIS + - name: Cache LLVM build + uses: actions/cache@v4 + with: + path: /mnt/build/ + key: llvm-build-${{ hashFiles('llvm-project/**', 'ASPIS/CMakeLists.txt') }} + restore-keys: | + llvm-build- - name: Checking out LLVM project uses: actions/checkout@master with: @@ -37,14 +44,6 @@ jobs: mkdir build cmake -B build -DLLVM_DIR=/mnt/build/lib/cmake/llvm/ cmake --build build - - name: Cache LLVM build - uses: actions/cache@v4 - with: - path: /mnt/build/ - key: llvm-build-${{ hashFiles('llvm-project/**', 'ASPIS/CMakeLists.txt') }} - restore-keys: | - llvm-build- - - name: Cache pip uses: actions/cache@v4 with: @@ -61,5 +60,5 @@ jobs: shell: bash working-directory: ./ASPIS/testing run: | - pytest test.py -n auto + pytest test.py From 9c17c78b9b57c1a7a96c90f373819048c9b33fb6 Mon Sep 17 00:00:00 2001 From: davidebaroffio-polimi Date: Mon, 21 Jul 2025 12:56:28 +0200 Subject: [PATCH 3/3] Changed CI llvm bin --- .github/workflows/main.yml | 7 ++++++- testing/config/llvm.toml | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 94a3720..cb1a920 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,6 +10,7 @@ jobs: path: ASPIS - name: Cache LLVM build uses: actions/cache@v4 + id: llvm-cache with: path: /mnt/build/ key: llvm-build-${{ hashFiles('llvm-project/**', 'ASPIS/CMakeLists.txt') }} @@ -17,11 +18,13 @@ jobs: llvm-build- - name: Checking out LLVM project uses: actions/checkout@master + if: steps.llvm-cache.outputs.cache-hit != 'true' with: repository: llvm/llvm-project ref: llvmorg-16.0.6 path: llvm-project - name: Compiling LLVM + if: steps.llvm-cache.outputs.cache-hit != 'true' shell: bash working-directory: ./llvm-project run: | @@ -46,13 +49,15 @@ jobs: cmake --build build - name: Cache pip uses: actions/cache@v4 + id: pip-cache with: path: ~/.cache/pip key: pip-${{ hashFiles('ASPIS/testing/requirements.txt') }} restore-keys: | pip- - name: Install Python requirements - shell: bash + shell: bash + if: steps.llvm-cache.outputs.cache-hit != 'true' working-directory: ./ASPIS/testing run: | pip install -r requirements.txt diff --git a/testing/config/llvm.toml b/testing/config/llvm.toml index 492d812..eed5e4f 100644 --- a/testing/config/llvm.toml +++ b/testing/config/llvm.toml @@ -1,2 +1,2 @@ #llvm_bin = "" -llvm_bin = "/mnt/build/lib/cmake/llvm/" +llvm_bin = "/mnt/build/bin/"