Skip to content

Commit

Permalink
ci: 🎡 fix macOS actions logic
Browse files Browse the repository at this point in the history
  • Loading branch information
darvid committed Mar 8, 2024
1 parent ba361e4 commit e178849
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup macOS environment
if: startsWith(matrix.os, 'flyci-macos')
if: contains(matrix.os, 'macos')
run: |
gid=$(id -g)
uid=$(id -u)
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Restore build dependencies cache (macOS)
id: build-deps-macos
if: startsWith(matrix.os, 'flyci-macos')
if: contains(matrix.os, 'macos')
uses: actions/cache/restore@v4
with:
key: build-deps-${{ runner.os }}-${{ matrix.os }}
Expand All @@ -46,12 +46,12 @@ jobs:
/opt/pcre
- name: Build Hyperscan (macOS)
if: startsWith(matrix.os, 'flyci-macos') && steps.build-deps-macos.outputs.cache-hit != 'true'
if: contains(matrix.os, 'macos') && steps.build-deps-macos.outputs.cache-hit != 'true'
run: |
./build_tools/macos/build_hyperscan.sh
- name: Upload build dependencies (macOS)
if: startsWith(matrix.os, 'flyci-macos') && steps.build-deps-macos.outputs.cache-hit != 'true'
if: contains(matrix.os, 'macos') && steps.build-deps-macos.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ${{ steps.build-deps-macos.outputs.cache-primary-key }}
Expand All @@ -62,7 +62,7 @@ jobs:
- name: Capture build dependencies cache key
id: build-deps-cache-key
run: |
echo "value=${{ startsWith(matrix.os, 'flyci-macos') && steps.build-deps-macos.outputs.cache-primary-key || '' }}" >> $GITHUB_OUTPUT
echo "value=${{ contains(matrix.os, 'macos') && steps.build-deps-macos.outputs.cache-primary-key || '' }}" >> $GITHUB_OUTPUT
build_wheels:
name: ${{ matrix.python_id }}-${{ matrix.platform_id }} wheel
Expand Down Expand Up @@ -242,15 +242,15 @@ jobs:
echo "version=$(pdm run semantic-release version --no-commit 2>/dev/null)" >> "$GITHUB_OUTPUT"
- name: Setup macOS environment
if: startsWith(matrix.os, 'flyci-macos')
if: contains(matrix.os, 'macos')
run: |
gid=$(id -g)
uid=$(id -u)
sudo mkdir -p /opt/vectorscan /opt/pcre
sudo chown -R $uid:$gid /opt/vectorscan /opt/pcre
- name: Restore build dependencies cache
if: startsWith(matrix.os, 'flyci-macos')
if: contains(matrix.os, 'macos')
uses: actions/cache/restore@v4
with:
key: ${{ needs.build_environment.outputs.build-deps-cache-key }}
Expand Down

0 comments on commit e178849

Please sign in to comment.