Improvements to Simple MDA from basic use. #270
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests | |
on: | |
push: | |
branches: | |
- master | |
concurrency: ci-${{ github.ref }} | |
jobs: | |
run-tests: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- { | |
name: "Windows Latest MSVC-2022", | |
os: windows-latest, | |
artifact: "windows_msvc2022.7z", | |
build_type: "Release", | |
cc: "cl", | |
cxx: "cl", | |
archiver: "7z a", | |
generators: "Visual Studio 17 2022" | |
} | |
steps: | |
- name: Check out repository code | |
uses: actions/[email protected] | |
with: | |
submodules: 'true' | |
- name: Setup Dev Env | |
uses: ./.github/actions/setup_dev_env | |
- name: List files in prefix | |
run: | | |
echo "In repo" | |
ls '${{ github.workspace }}' | |
echo "In temp folder" | |
ls '${{runner.temp}}' | |
echo "In Install" | |
ls '${{runner.temp}}/install' | |
echo "In Install/lib" | |
ls '${{runner.temp}}/install/lib' | |
echo "In Install/include" | |
ls '${{runner.temp}}/install/include' | |
echo "In Install/bin" | |
ls '${{runner.temp}}/install/bin' | |
- name: Cache config/build | |
id: cache-test-build | |
uses: actions/cache@v3 | |
with: | |
path: '${{runner.temp}}/build_tests' | |
key: ${{ runner.os }}-config-tests-release-${{ hashFiles('**/CMakeLists.txt') }} | |
#key: ${{ runner.os }}-cmake-config-tests | |
- name: Initial tests cmake config/build | |
shell: pwsh | |
if: steps.cache-test-build.outputs.cache-hit != 'true' && runner.os == 'Windows' | |
working-directory: ${{runner.temp}} | |
run: | | |
mkdir build_tests | |
cd build_tests | |
cmake -DInterSpec_FETCH_DEPENDENCIES=OFF -DCMAKE_PREFIX_PATH="${{runner.temp}}/install" -DNO_CMAKE_SYSTEM_PATH=ON -DCMAKE_FIND_USE_CMAKE_SYSTEM_PATH=OFF -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_BUILD_TYPE="Release" -DCMAKE_CONFIGURATION_TYPES="Release" -DCMAKE_CONFIGURATION_TYPES="Release" -DUSE_LEAFLET_MAP=OFF -G "Ninja" "${{ github.workspace }}/target/testing" | |
- name: Run tests | |
id: run-tests | |
shell: pwsh | |
working-directory: ${{runner.temp}}/build_tests | |
# Ordinarily we would `cmake --build . --target RUN_TESTS` to run tests, but this doesnt work with ninja generator | |
run: | | |
cmake --build . --config Release | |
Copy-Item "${{ github.workspace }}\external_libs\SandiaDecay\sandia.decay.xml" -Destination "${{ github.workspace }}\data" | |
ninja test | |
New-Item -ItemType Directory -Force -Path TestLogs | |
Get-ChildItem -Path TestLogs -Include *.* -Recurse | foreach { $_.Delete()} | |
if (Test-Path "Testing/Temporary/LastTest.log") { Copy-Item "Testing/Temporary/LastTest.log" -Destination TestLogs } else { echo "No LastTest.log avaialable" >> TestLogs/LastTest.log } | |
- name: Upload test logs as GitHub Artifact | |
uses: actions/[email protected] | |
with: | |
name: InterSpec_test_logs_${{ runner.os }} | |
path: '${{runner.temp}}/build_tests/TestLogs' | |
- run: echo "Job status is ${{ job.status }}." | |