File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Run Tests
2+ description : Run test suite
3+
4+ runs :
5+ using : composite
6+ steps :
7+ - name : Run tests
8+ shell : bash
9+ run : ctest --test-dir build -C Release --output-on-failure
Original file line number Diff line number Diff line change @@ -2,6 +2,12 @@ name: Build Linux
22
33on :
44 workflow_call :
5+ inputs :
6+ run_tests :
7+ description : Build and run tests
8+ required : false
9+ type : boolean
10+ default : false
511
612jobs :
713 build-linux :
@@ -27,14 +33,21 @@ jobs:
2733 build-essential cmake git wget
2834
2935 - name : Clone repositories
30- run : cmake -P Setup.cmake
36+ run : cmake -DREDASM_FETCH_TESTS=${{ inputs.run_tests && 'ON' || 'OFF' }} - P Setup.cmake
3137
3238 - name : Configure
33- run : cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
39+ run : cmake -B build \
40+ -DCMAKE_BUILD_TYPE=Release \
41+ -DCMAKE_INSTALL_PREFIX=/usr \
42+ ${{ inputs.run_tests && format('-DREDASM_FETCH_TESTS=ON -DREDASM_SAMPLES={0}/samples', github.workspace) || '' }}
3443
3544 - name : Build
3645 run : cmake --build build --parallel
3746
47+ - name : Run tests
48+ if : inputs.run_tests
49+ uses : ./.github/actions/test
50+
3851 - name : Install into AppDir
3952 run : cmake --install build --prefix AppDir/usr
4053
Original file line number Diff line number Diff line change @@ -2,6 +2,12 @@ name: Build Windows
22
33on :
44 workflow_call :
5+ inputs :
6+ run_tests :
7+ description : Build and run test suite
8+ required : false
9+ type : boolean
10+ default : false
511
612jobs :
713 build-windows :
@@ -21,14 +27,20 @@ jobs:
2127 cache : true
2228
2329 - name : Clone repositories
24- run : cmake -P Setup.cmake
30+ run : cmake -DREDASM_FETCH_TESTS=${{ inputs.run_tests && 'ON' || 'OFF' }} - P Setup.cmake
2531
2632 - name : Configure
27- run : cmake -B build -DCMAKE_PREFIX_PATH="${{ env.Qt6_DIR }}"
33+ run : cmake -B build `
34+ -DCMAKE_PREFIX_PATH="${{ env.Qt6_DIR }}" `
35+ ${{ inputs.run_tests && format('-DREDASM_FETCH_TESTS=ON -DREDASM_SAMPLES={0}/samples', github.workspace) || '' }}
2836
2937 - name : Build
3038 run : cmake --build build --config Release --parallel
3139
40+ - name : Run tests
41+ if : inputs.run_tests
42+ uses : ./.github/actions/test
43+
3244 - name : Install
3345 run : cmake --install build --prefix redasm-windows-x86_64 --config Release
3446
Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ concurrency:
1414jobs :
1515 build-linux :
1616 uses : ./.github/workflows/build-linux.yml
17+ with :
18+ run_tests : true
1719
1820 build-windows :
1921 uses : ./.github/workflows/build-windows.yml
22+ with :
23+ run_tests : true
Original file line number Diff line number Diff line change @@ -2,12 +2,14 @@ cmake_minimum_required(VERSION 3.25)
22
33find_package (Git REQUIRED )
44
5- option (REDASM_FETCH_TESTS "Fetch tests and samples repositories" OFF )
6-
75if (NOT GIT_FOUND)
86 message (FATAL_ERROR "Git is required to clone repositories. Please install Git and try again." )
97endif ()
108
9+ if (NOT DEFINED REDASM_FETCH_TESTS)
10+ set (REDASM_FETCH_TESTS OFF )
11+ endif ()
12+
1113# Version overrides: set via -D or environment for CI/release builds
1214# e.g: cmake -DCORE_VERSION=v4.0.1 -P setup.cmake
1315set (CORE_VERSION $ENV{CORE_VERSION} )
@@ -51,6 +53,8 @@ set(REPO_processors ${PROCESSORS_VERSION})
5153set (REPO_commands ${COMMANDS_VERSION} )
5254set (REPO_analyzers ${ANALYZERS_VERSION} )
5355set (REPO_kb ${KB_VERSION} )
56+ set (REPO_tests "master" ) # no tagging here
57+ set (REPO_samples "master" ) # no tagging here
5458
5559set (REPOS
5660 core
You can’t perform that action at this time.
0 commit comments