Add mgis to run parameter for unix (it's not added to #53
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-code-aster-build | |
# bump 1 | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- win-support | |
# - donotrun | |
env: | |
CONDA_FILE: "" | |
OUTPUT_DIR: "${{ github.workspace }}\\test_output" | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '1' | |
- uses: ./.github/actions/install-intel-fortran | |
if: ${{ runner.os == 'Windows' }} | |
with: | |
version: 2025.0.0 | |
activate: false | |
- uses: prefix-dev/[email protected] | |
with: | |
pixi-version: v0.39.2 | |
cache: true | |
- name: Build Code_Aster | |
shell: bash | |
run: | | |
pixi run cbuild --no-test | |
- name: If failed build, upload log | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: BuildLog-${{ runner.os }}-${{ github.run_id }} | |
path: ${{ github.workspace }}/output/bld | |
- name: Find the outputted .conda file and set it as an output | |
run: | | |
import pathlib | |
import os | |
output_dir = pathlib.Path("output").resolve() | |
conda_files = list(output_dir.rglob("*.conda")) | |
if len(conda_files) != 1: | |
raise ValueError(f"Expected 1 .conda file, found {len(conda_files)}") | |
conda_file = conda_files[0] | |
with open(os.environ["GITHUB_ENV"], "a") as env_file: | |
env_file.write(f"CONDA_FILE={conda_file.as_posix()}\n") | |
shell: pixi run python {0} | |
- name: run rattler test | |
if: ${{ runner.os == 'Windows' }} | |
continue-on-error: true # Prevent the workflow from failing | |
run: | | |
pixi run ctest --package-file ${{ env.CONDA_FILE }} | |
- name: run rattler test | |
if: ${{ runner.os != 'Windows' }} | |
continue-on-error: true # Prevent the workflow from failing | |
run: | | |
pixi run ctest --package-file ${{ env.CONDA_FILE }} --channel-priority=disabled | |
- name: Save Run directory to artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: TestResults-${{ runner.os }}-${{ github.run_id }} | |
path: ${{ env.OUTPUT_DIR }} |