diff --git a/.github/actions/cubit_setup/action.yml b/.github/actions/cubit_setup/action.yml index 81632222..bd1e21ce 100644 --- a/.github/actions/cubit_setup/action.yml +++ b/.github/actions/cubit_setup/action.yml @@ -19,9 +19,9 @@ inputs: required: false default: "60" outputs: - cubit_root: + cubitpy_config_file: description: "Path to the Cubit installation" - value: ${{ steps.cubit-setup.outputs.cubit_root }} + value: ${{ steps.cubit-setup.outputs.cubitpy_config_file }} runs: using: composite steps: @@ -46,7 +46,7 @@ runs: # Save cubit root path for following steps CUBIT_FOLDER=$(find . -maxdepth 1 -type d -name "Coreform-Cubit-*" | head -n 1 | sed 's|^\./||') CUBIT_ROOT="$(pwd)/$CUBIT_FOLDER" - echo "cubit_root=$CUBIT_ROOT" >> "$GITHUB_OUTPUT" + echo "cubit_root=$CUBIT_ROOT" >> "$GITHUB_ENV" # Activate cubit. Retry login until success or timeout. timeout="${{ inputs.cubit_activation_timeout }}" delay="${{ inputs.cubit_activation_delay_between_retries }}" @@ -65,3 +65,15 @@ runs: sleep $delay done echo "Cubit activation succeeded." + + - name: Create cubit config file + shell: bash + run: | + CUBITPY_CONFIG_FILE="$GITHUB_WORKSPACE/cubit_config.yaml" + echo "cubitpy_config_file=$CUBITPY_CONFIG_FILE" >> "$GITHUB_OUTPUT" + + : > $CUBITPY_CONFIG_FILE # truncate / create file + + printf "cubitpy_mode: local\n" >> $CUBITPY_CONFIG_FILE + printf "local_config:\n" >> $CUBITPY_CONFIG_FILE + printf " cubit_path: \"%s\"\n" "$CUBIT_ROOT" >> $CUBITPY_CONFIG_FILE diff --git a/.github/actions/run_tests/action.yml b/.github/actions/run_tests/action.yml index b2aef487..f78c08d7 100644 --- a/.github/actions/run_tests/action.yml +++ b/.github/actions/run_tests/action.yml @@ -5,8 +5,8 @@ inputs: description: Additional flags to pass to pytest, i.e., markers required: false default: "" - cubit-root: - description: Path to the cubit installation + cubitpy_config_file: + description: Path to the cubitpy config file required: false default: "" runs: @@ -18,7 +18,7 @@ runs: BEAMME_FOUR_C_EXE: /home/user/4C/bin/4C OMPI_MCA_rmaps_base_oversubscribe: 1 run: | - export CUBIT_ROOT=${{ inputs.cubit-root }} + export CUBITPY_CONFIG_PATH=${{ inputs.cubitpy_config_file }} cd ${GITHUB_WORKSPACE} TEMP_DIR="${RUNNER_TEMP}/beamme_pytest" mkdir -p "$TEMP_DIR" diff --git a/.github/workflows/testing_protected.yml b/.github/workflows/testing_protected.yml index e32e6f0c..09d3a650 100644 --- a/.github/workflows/testing_protected.yml +++ b/.github/workflows/testing_protected.yml @@ -58,12 +58,12 @@ jobs: uses: ./.github/actions/run_tests with: additional-pytest-flags: "--4C --ArborX --CubitPy --check-for-unused-reference-files --cov-fail-under=93" - cubit-root: ${{ steps.cubit.outputs.cubit_root }} + cubitpy_config_file: ${{ steps.cubit.outputs.cubitpy_config_file }} - name: Free cubit license if: ${{ always() }} uses: ./.github/actions/cubit_finalize with: - cubit-root: ${{ steps.cubit.outputs.cubit_root }} + cubitpy_config_file: ${{ steps.cubit.outputs.cubitpy_config_file }} - name: Coverage badge and report uses: ./.github/actions/coverage