First example to actually use smesh #10
Workflow file for this run
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: CI | |
on: | |
push: | |
branches: | |
- main | |
tags: ['*'] | |
paths-ignore: | |
- 'CITATION.bib' | |
- 'LICENSE.md' | |
- 'README.md' | |
- '.zenodo.json' | |
- '.github/workflows/CompatHelper.yml' | |
- '.github/workflows/SpellCheck.yml' | |
- '.github/workflows/TagBot.yml' | |
- 'docs/**' | |
pull_request: | |
paths-ignore: | |
- 'CITATION.bib' | |
- 'LICENSE.md' | |
- 'README.md' | |
- '.zenodo.json' | |
- '.github/workflows/CompatHelper.yml' | |
- '.github/workflows/SpellCheck.yml' | |
- '.github/workflows/TagBot.yml' | |
- 'docs/**' | |
workflow_dispatch: | |
concurrency: | |
# Skip intermediate builds: always. | |
# Cancel intermediate builds: only if it is a pull request build. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
jobs: | |
test: | |
name: ${{ matrix.os }} - Julia ${{ matrix.version }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '1.8' | |
- '1.9' | |
- '1.10' | |
os: | |
- ubuntu-latest | |
- macOS-latest | |
- windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# BEGIN - Build smesh locally - remove once JLL package is available | |
- uses: msys2/setup-msys2@v2 | |
if: ${{ matrix.os == 'windows-latest' }} | |
with: | |
update: true | |
install: git base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake | |
- name: Get smesh | |
uses: actions/checkout@v4 | |
with: | |
repository: trixi-framework/smesh | |
path: smesh | |
- name: Build smesh (Linux) | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
mkdir smesh/build && cd smesh/build | |
cmake .. -DCMAKE_INSTALL_PREFIX=../install | |
cmake --build . | |
cmake --install . | |
cd ../.. | |
cat << EOF > LocalPreferences.toml | |
[Smesh] | |
libsmesh = "$(pwd)/smesh/install/lib/libsmesh.so" | |
EOF | |
- name: Build smesh (macOS) | |
if: ${{ matrix.os == 'macos-latest' }} | |
run: | | |
mkdir smesh/build && cd smesh/build | |
FC=gfortran-13 cmake .. -DCMAKE_INSTALL_PREFIX=../install | |
cmake --build . | |
cmake --install . | |
cd ../.. | |
cat << EOF > LocalPreferences.toml | |
[Smesh] | |
libsmesh = "$(pwd)/smesh/install/lib/libsmesh.dylib" | |
EOF | |
- name: Build smesh | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
mkdir smesh/build && cd smesh/build | |
FC=gfortran cmake .. -DCMAKE_INSTALL_PREFIX=../install | |
cmake --build . | |
cmake --install . | |
cd ../.. | |
cat << EOF > LocalPreferences.toml | |
[Smesh] | |
libsmesh = "$(pwd)/smesh/install/bin/libsmesh.dll" | |
EOF | |
shell: 'msys2 {0}' | |
- name: Verify | |
if: ${{ matrix.os != 'windows-latest' }} | |
run: | | |
cat LocalPreferences.toml | |
ls -la $(pwd)/smesh/install/lib/libsmesh.* | |
- name: Verify | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
cat LocalPreferences.toml | |
ls -la $(pwd)/smesh/install/lib/ | |
ls -la $(pwd)/smesh/install/bin/ | |
shell: 'msys2 {0}' | |
# END - Build smesh locally - remove once JLL package is available | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
- run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)' | |
- uses: julia-actions/cache@v1 | |
- uses: julia-actions/julia-buildpkg@v1 | |
- uses: julia-actions/julia-runtest@v1 | |
- uses: julia-actions/julia-processcoverage@v1 | |
with: | |
directories: src,examples | |
- uses: codecov/codecov-action@v3 | |
with: | |
files: lcov.info | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./lcov.info | |
# Enable tmate debugging of manually-triggered workflows if the input option was provided | |
- name: Setup tmate session for debugging | |
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled && always() }} | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 15 |