Update ci, only run ubuntu-latest / windows-latest, but lock them to … (#26)

* Update ci, only run ubuntu-latest / windows-latest, but lock them to specific versions, and only upload when we're on master
This commit is contained in:
sappho 2024-05-02 18:45:04 -04:00 committed by GitHub
parent 1a9472480c
commit 6b361db6de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,30 +2,24 @@ name: Extension builder
on: on:
push: push:
branches: [ action, master ] branches: [ master ]
pull_request: pull_request:
branches: [ action, master ] branches: [ master ]
jobs: jobs:
build: build:
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04, windows-2019, ubuntu-latest, windows-latest] os: [ubuntu-22.04, windows-2022]
include: include:
- os: ubuntu-20.04 - os: ubuntu-22.04
cc: clang-10
cxx: clang++-10
- os: windows-2019
cc: msvc
- os: ubuntu-latest
cc: clang cc: clang
cxx: clang++ cxx: clang++
- os: windows-latest - os: windows-2022
cc: msvc cc: msvc
fail-fast: false fail-fast: false
name: ${{ matrix.os }} - ${{ matrix.cc }} name: ${{ matrix.os }} - ${{ matrix.cc }}
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -155,7 +149,7 @@ jobs:
cp "${{ env.ZIP_FILENAME }}" "${{ matrix.os }}_${{ matrix.cc }}_${{ env.ZIP_FILENAME }}" cp "${{ env.ZIP_FILENAME }}" "${{ matrix.os }}_${{ matrix.cc }}_${{ env.ZIP_FILENAME }}"
- name: Upload release - name: Upload release
if: github.event_name == 'push' && github.ref == 'refs/heads/action' && (startsWith(matrix.os, 'ubuntu-latest') || startsWith(matrix.os, 'windows-latest')) if: github.event_name == 'push' && github.ref == 'refs/heads/master'
shell: bash shell: bash
working-directory: extension/build/package working-directory: extension/build/package
run: | run: |
@ -163,7 +157,7 @@ jobs:
AUTHORIZATION="$(echo -n '${{ secrets.USERNAME }}:${{ secrets.PASSWORD }}' | base64)" AUTHORIZATION="$(echo -n '${{ secrets.USERNAME }}:${{ secrets.PASSWORD }}' | base64)"
echo "::add-mask::${AUTHORIZATION}" echo "::add-mask::${AUTHORIZATION}"
HTTP_CODE=$(curl -XPOST -H "Authorization: Basic ${AUTHORIZATION}" -H "Content-Type: application/zip" --output /dev/null --silent --write-out "%{http_code}" --data-binary "@${{ env.ZIP_FILENAME }}" "https://builds.limetech.io/upload.php?project=${{ env.PROJECT }}&branch=action&filename=${{ env.ZIP_FILENAME }}") HTTP_CODE=$(curl -XPOST -H "Authorization: Basic ${AUTHORIZATION}" -H "Content-Type: application/zip" --output /dev/null --silent --write-out "%{http_code}" --data-binary "@${{ env.ZIP_FILENAME }}" "https://builds.limetech.io/upload.php?project=${{ env.PROJECT }}&filename=${{ env.ZIP_FILENAME }}")
if test ${HTTP_CODE} -ne 200; then if test ${HTTP_CODE} -ne 200; then
exit ${HTTP_CODE} exit ${HTTP_CODE}
fi fi