From 5e0ea1f4d2698faafd276e66f813537d9d26c81e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Schartum=20Dokken?= Date: Fri, 9 Feb 2024 15:02:52 +0100 Subject: [PATCH] Fix CI for multiple artifact uploads with different compilers --- .github/workflows/build_docs.yml | 6 ++--- .../workflows/create_legacy_checkpoint.yml | 12 ++++----- .github/workflows/create_legacy_data.yml | 25 ++++++++++--------- .github/workflows/test_package_openmpi.yml | 8 +++--- 4 files changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build_docs.yml b/.github/workflows/build_docs.yml index eb14a44..1193768 100644 --- a/.github/workflows/build_docs.yml +++ b/.github/workflows/build_docs.yml @@ -10,7 +10,7 @@ on: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: workflow_call: - inputs: + inputs: artifact_name: type: string required: true @@ -44,7 +44,7 @@ jobs: - name: Upload documentation as artifact (from workflow call) uses: actions/upload-artifact@v4 - if: ${ { github.event_name } == 'workflow_call' + if: ${{ github.event_name == 'workflow_call' }} with: name: ${{ inputs.artifact_name }} path: ${{ env.PUBLISH_DIR }} @@ -53,7 +53,7 @@ jobs: - name: Upload documentation as artifact uses: actions/upload-artifact@v4 - if: ${ { github.event_name } != 'workflow_call' + if: ${{ github.event_name != 'workflow_call' }} with: name: ${{ env.ARTIFACT_NAME }} path: ${{ env.PUBLISH_DIR }} diff --git a/.github/workflows/create_legacy_checkpoint.yml b/.github/workflows/create_legacy_checkpoint.yml index 9b7dd91..abcf78a 100644 --- a/.github/workflows/create_legacy_checkpoint.yml +++ b/.github/workflows/create_legacy_checkpoint.yml @@ -2,17 +2,17 @@ name: Generate adios4dolfinx legacy data on: workflow_call: - inputs: + inputs: artifact_name: type: string required: true - -env: - data_dir: "legacy_checkpoint" - adios4dolfinx_version: "0.7.1" + description: "Name of the artifact to be created" jobs: create-adios-data: + env: + data_dir: "legacy_checkpoint" + adios4dolfinx_version: "0.7.1" runs-on: "ubuntu-22.04" container: ghcr.io/fenics/dolfinx/dolfinx:v0.7.3 @@ -27,5 +27,5 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: ${{inputs.artifact_name}_${{ env.data_dir }} + name: ${{ inputs.artifact_name }} path: ./${{ env.data_dir }} diff --git a/.github/workflows/create_legacy_data.yml b/.github/workflows/create_legacy_data.yml index 9887c8f..d5d5f6f 100644 --- a/.github/workflows/create_legacy_data.yml +++ b/.github/workflows/create_legacy_data.yml @@ -2,26 +2,27 @@ name: Generate data from Legacy DOLFIN on: workflow_call: - inputs: + inputs: artifact_name: type: string required: true - -env: - data_dir: "legacy" - + description: "Name of the artifact to be created" jobs: + create-dolfin-data: + env: + data_dir: "legacy" + runs-on: "ubuntu-22.04" container: ghcr.io/scientificcomputing/fenics:2023-11-15 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - - name: Create datasets - run: python3 ./tests/create_legacy_data.py --output-dir=$data_dir + - name: Create datasets + run: python3 ./tests/create_legacy_data.py --output-dir=$data_dir - - uses: actions/upload-artifact@v4 - with: - name: ${{inputs.artifact_name}_${{ env.data_dir }} - path: ./${{ env.data_dir }} + - uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.artifact_name }} + path: ./${{ env.data_dir }} diff --git a/.github/workflows/test_package_openmpi.yml b/.github/workflows/test_package_openmpi.yml index b3253d8..2581abf 100644 --- a/.github/workflows/test_package_openmpi.yml +++ b/.github/workflows/test_package_openmpi.yml @@ -56,14 +56,14 @@ jobs: - name: Download legacy data uses: actions/download-artifact@v4 with: - name: legacy - path: ./legacy_ompi + name: legacy_ompi + path: ./legacy - name: Download legacy data uses: actions/download-artifact@v4 with: - name: legacy_checkpoint - path: ./legacy_checkpoint_ompi + name: legacy_checkpoint_ompi + path: ./legacy_checkpoint - name: Install package run: python3 -m pip install .[test]