Skip to content

Commit

Permalink
Simpler condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad-el-sayed committed Feb 1, 2024
1 parent 87b5b81 commit 7637f34
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,32 +40,32 @@ jobs:

steps:
- id: condition
# run: |
# if [ "${{ runner.os }}" == "macOS" ]; then
# if [[ ${{ matrix.platform }} == 'macos-13-xlarge' && ${{ github.head_ref }} != 'feature/*' ]]; then
# echo "condition=true" >> $GITHUB_OUTPUT
# else
# echo "condition=false" >> $GITHUB_OUTPUT
# fi
# else
# echo "condition=true" >> $GITHUB_OUTPUT
# fi

run: |
if [ "${{ runner.os }}" == "macOS" ]; then
if [[ ${{ matrix.platform }} == 'macos-13-xlarge' && ${{ github.head_ref }} != 'feature/*' ]]; then
echo "condition=true" >> $GITHUB_OUTPUT
else
echo "condition=false" >> $GITHUB_OUTPUT
fi
if [[ ${{ matrix.platform }} == 'macos-13-xlarge' && ${{ github.head_ref }} == 'feature/*' ]]; then
echo "condition=false" >> $GITHUB_OUTPUT
else
echo "condition=true" >> $GITHUB_OUTPUT
echo "condition=true" >> $GITHUB_OUTPUT
fi
# run: |
# if [[ ${{ matrix.platform }} == 'macos-13-xlarge' && ${{ github.ref }} != 'refs/heads/feature/*' ]]; then
# echo "condition=true" >> $GITHUB_OUTPUT
# else
# echo "condition=false" >> $GITHUB_OUTPUT
# fi

build:

needs: [setup]

runs-on: ${{needs.setup.outputs.platform}}

if: ${{ needs.setup.outputs.condition }} == 'true'

runs-on: ${{needs.setup.outputs.platform}}

name: ${{needs.setup.outputs.platform}}-${{needs.setup.outputs.build_type}}

# The default compiler on macos is clang, switch to gcc 11. Specifying the version is necessary.
Expand Down

0 comments on commit 7637f34

Please sign in to comment.