Skip to content

Commit

Permalink
Reference reusable action from local repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad-el-sayed committed Feb 7, 2024
1 parent 0cf2617 commit c5c4e50
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 24 deletions.
17 changes: 5 additions & 12 deletions .github/workflows/build-and-test-feature.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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 }}
target_platform: ${{ matrix.target_platform }}
build_type: ${{ matrix.build_type }}
21 changes: 9 additions & 12 deletions .github/workflows/build-and-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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

0 comments on commit c5c4e50

Please sign in to comment.