forked from lanl/tardigrade-micromorphic-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (61 loc) · 1.91 KB
/
github-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Tests on pull request
run-name: ${{ github.actor }} is testing a pull request
on:
pull_request:
types:
- opened
- edited
- synchronize
branches:
- dev
- main
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
fail-fast: false
matrix:
os: [ubuntu-latest]
build_type: [Release]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: MiniConda setup
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
channels: conda-forge,defaults
channel-priority: true
auto-activate-base: false
activate-environment: "test-environment"
- name: check solution
run: |
conda env export
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
echo "environment-file=${{ github.workspace }}/reduced_environment.txt" >> "$GITHUB_OUTPUT"
echo "moose-dir=${{ github.workspace }}/moose-dir" >> "$GITHUB_OUTPUT"
- name: Conda environment
shell: bash -el {0}
run: |
mamba install --file ${{ steps.strings.outputs.environment-file }} --yes --channel conda-forge
- name: Build
shell: bash -el {0}
run: |
mkdir build
cd build
cmake .. -DTARDIGRADE_MICROMORPHIC_TOOLS_BUILD_PYTHON_BINDINGS=OFF
make
- name: Test
shell: bash -el {0}
# working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: |
conda activate test-environment
cd build
ctest