Skip to content

Commit

Permalink
Skip builds older than OTP 25
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmach committed Oct 28, 2024
1 parent 43d3675 commit 9f7e03f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,32 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Check OTP_REF_NAME
run: |
if [[ $OTP_REF_NAME =~ maint-([0-9]+) ]]; then
version="${BASH_REMATCH[1]}"
elif [[ $OTP_REF_NAME =~ OTP-([0-9]+)(\.[0-9]+)* ]]; then
version="${BASH_REMATCH[1]}"
else
version=25
fi
if [[ $version -lt 25 ]]; then
run: echo "SKIP=true" >> $GITHUB_ENV
fi
- name: Update OPENSSL_VERSION
if: ${{ contains(env.OTP_REF_NAME, 'OTP-25') || contains(env.OTP_REF_NAME, 'maint-25') }}
run: echo "OPENSSL_VERSION=1.1.1w" >> $GITHUB_ENV

- uses: actions/cache@v4
if: ${{ env.SKIP != 'true' }}
with:
path: ${{ env.OPENSSL_DIR }}
key: openssl-${{ env.OPENSSL_VERSION }}-${{ matrix.pair.target }}

- uses: actions/cache@v4
if: ${{ env.SKIP != 'true' }}
with:
path: ${{ env.WXWIDGETS_DIR }}
key: wxwidgets-${{ env.WXWIDGETS_VERSION }}-${{ matrix.pair.target }}
Expand All @@ -85,16 +101,19 @@ jobs:
# key: otp-${{ env.OTP_REF_NAME }}-${{ env.OTP_REF }}-openssl-${{ env.OPENSSL_VERSION }}-wxwidgets-${{ env.WXWIDGETS_VERSION }}-${{ matrix.pair.target }}

- name: "Build OTP"
if: ${{ env.SKIP != 'true' }}
run: |
bash scripts/build_otp_macos.bash "${{ env.OTP_REF_NAME }}"
- name: "Attest build provenance"
if: ${{ env.SKIP != 'true' }}
uses: actions/attest-build-provenance@v1
id: attest-build-provenance
with:
subject-path: ${{ env.OTP_TGZ }}

- name: "Upload"
if: ${{ env.SKIP != 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ATTESTATION: ${{ steps.attest-build-provenance.outputs.bundle-path }}
Expand Down

0 comments on commit 9f7e03f

Please sign in to comment.