From c5c4e503588db1767c201d5f0d872b585d5f6ed7 Mon Sep 17 00:00:00 2001 From: Ahmad El Sayed Date: Wed, 7 Feb 2024 11:02:42 +0100 Subject: [PATCH] Reference reusable action from local repo --- .github/workflows/build-and-test-feature.yml | 17 +++++---------- .github/workflows/build-and-test-workflow.yml | 21 ++++++++----------- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build-and-test-feature.yml b/.github/workflows/build-and-test-feature.yml index 226f85cb2..fcb048002 100644 --- a/.github/workflows/build-and-test-feature.yml +++ b/.github/workflows/build-and-test-feature.yml @@ -1,17 +1,11 @@ name: Build and test on: - # push: - # branches: - # - master - # - "release/v[0-9].[0-9].[0-9]" pull_request: types: - opened # triggers build when opened - synchronize # triggers build when commits are pushed to HEAD branches: - #- master - #- "release/v[0-9].[0-9].[0-9]" - "feature/**" # Manual trigger workflow_dispatch: @@ -23,16 +17,15 @@ jobs: strategy: fail-fast: false matrix: - platform: + target_platform: - ubuntu-latest - macos-latest - #- macos-13-xlarge build_type: - Release - Debug - #- DebugWithRelInfo - uses: Deltares/MeshKernel/.github/workflows/build-and-test-workflow.yml@13b53c2b5f6c25c277d753dbca553fabf4d31bbe + #uses: Deltares/MeshKernel/.github/workflows/build-and-test-workflow.yml@13b53c2b5f6c25c277d753dbca553fabf4d31bbe + uses: ./build-and-test-workflow.yml with: - platform: ${{ matrix.platform }} - build_type: ${{ matrix.build_type }} \ No newline at end of file + target_platform: ${{ matrix.target_platform }} + build_type: ${{ matrix.build_type }} diff --git a/.github/workflows/build-and-test-workflow.yml b/.github/workflows/build-and-test-workflow.yml index 1e4398e4f..8a30cfc42 100644 --- a/.github/workflows/build-and-test-workflow.yml +++ b/.github/workflows/build-and-test-workflow.yml @@ -2,27 +2,24 @@ name: Build and test workflow on: workflow_call: - inputs: - platform: + target_platform: + description: "Target platform" required: true type: string build_type: - required: true - type: string - + description: "Build type" + required: true + type: string + jobs: build: - # Build strategy - #strategy: - # fail-fast: false - # Build platform - runs-on: ${{ inputs.platform }} + runs-on: ${{ inputs.target_platform }} - name: ${{ inputs.platform }}-${{ inputs.build_type }} + name: ${{ inputs.target_platform }}-${{ inputs.build_type }} # The default compiler on macos is clang, switch to gcc 11. Specifying the version is necessary. # It seems like gcc and g++ are symbolic links to the default clang and clang++ compilers, respectively. @@ -119,6 +116,6 @@ jobs: uses: actions/upload-artifact@v4 if: always() with: - name: meshkernel-${{ inputs.platform }}-${{ inputs.build_type }} + name: meshkernel-${{ inputs.target_platform }}-${{ inputs.build_type }} path: ${{ steps.paths.outputs.install_dir }} if-no-files-found: error