Skip to content

Commit 3857158

Browse files
committed
ctest --parallel requires at least CMake 3.29
Use conda env for check-in regression
1 parent bbc6710 commit 3857158

File tree

2 files changed

+31
-3
lines changed

2 files changed

+31
-3
lines changed

.github/workflows/ubuntu-build.yml

+29-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,35 @@ jobs:
1616
- name: Install Dependencies
1717
run: |
1818
sudo apt-get update
19-
sudo apt-get -y install libboost-dev
19+
20+
# Setup Conda and build environment
21+
- name: Grab Python v3.8
22+
uses: actions/setup-python@v3
23+
with:
24+
python-version: 3.8
25+
26+
# Cache the conda dependencies to
27+
- name: Cache conda deps
28+
uses: actions/cache@v3
29+
with:
30+
key: ${{ matrix.os }}-${{ matrix.BUILD_TYPE }}-${{ matrix.COMPILER }}-conda-${{ hashFiles('conda/environment.yml') }}
31+
path: /usr/share/miniconda/envs/riscv_perf_model # Default path for conda
32+
33+
# Setup CCache to cache builds
34+
- name: ccache
35+
uses: hendrikmuhs/ccache-action@v1.2
36+
with:
37+
key: ${{ matrix.os }}-${{ matrix.BUILD_TYPE }}-${{ matrix.COMPILER }}-ccache-${{ github.ref_name }}
38+
restore-keys: |
39+
${{ matrix.os }}-${{ matrix.BUILD_TYPE }}-${{ matrix.COMPILER }}-ccache-master
40+
${{ matrix.os }}-${{ matrix.BUILD_TYPE }}-${{ matrix.COMPILER }}-ccache
41+
42+
- name: Setup Conda Environment
43+
run: |
44+
# $CONDA is an environment variable pointing to the root of the miniconda directory
45+
$CONDA/bin/conda config --set channel_priority strict
46+
$CONDA/bin/conda env update --file ${{ github.workspace }}/conda/environment.yml
47+
$CONDA/bin/conda init bash
2048
2149
- name: Create Build Directory
2250
run: cmake -E make_directory ${{runner.workspace}}/build

tests/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.17)
1+
cmake_minimum_required(VERSION 3.29)
22
project(stf_tests)
33

44
include_directories(${PROJECT_SOURCE_DIR}/..)
@@ -21,4 +21,4 @@ add_dependencies(regress stf stf_writer_test)
2121

2222
add_custom_command(TARGET regress POST_BUILD
2323
COMMAND ${CMAKE_COMMAND} -E echo "Running tests..."
24-
COMMAND ${CMAKE_CTEST_COMMAND} ${ctest_test_args})
24+
COMMAND ${CMAKE_CTEST_COMMAND} ${ctest_test_args})

0 commit comments

Comments
 (0)