Skip to content

Commit

Permalink
Update cmake-multi-platform.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollot authored Nov 27, 2023
1 parent d416788 commit a1f3cea
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@ name: CMake on multiple platforms

on:
workflow_dispatch:
inputs:
build-type:
description: 'Build type (default: Release)'
required: false
default: 'Release'
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
BUILD_DIR: '${{ github.workspace }}/build'
PYTHON_OUTPUT_DIR: env.BUILD_DIR/${{ matrix.build_type }}/lib/python3.10"

jobs:
build:
runs-on: ${{ matrix.os }}
Expand All @@ -17,7 +26,7 @@ jobs:

matrix:
os: [ubuntu-latest, macos-latest]
build_type: [Release]
build_type: ${{ env.build_type }}
c_compiler: [gcc]
include:
- os: ubuntu-latest
Expand All @@ -27,10 +36,6 @@ jobs:
c_compiler: gcc
cpp_compiler: gcc

env:
BUILD_DIR: '${{ github.workspace }}/build'
PYTHON_OUTPUT_DIR: $BUILD_DIR/${{ matrix.build_type }}/lib/python3.10"

steps:
- uses: actions/checkout@v3

Expand All @@ -47,8 +52,8 @@ jobs:
uses: actions/cache@v3
with:
path: |
'$BUILD_DIR/python'
'$PYTHON_OUTPUT_DIR'
'${{ env.BUILD_DIR }}/python'
'${{ env.PYTHON_OUTPUT_DIR }}'
key: ${{ runner.OS }}-python-cache-${{ hashFiles('python/*') }}
restore-keys: |
${{ runner.OS }}-python-cache-
Expand Down

0 comments on commit a1f3cea

Please sign in to comment.