From 904640e028e7aa00b17c730887cfce070801cc66 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Sun, 2 Jul 2023 06:51:26 +0200 Subject: [PATCH] CI steps (#65) * break build up into steps * download artifacts * clone uploadtool * need env on windows * just use ubuntu for inkscape * report went missing * add inkscape to path * use ubuntu for compare * Revert "use ubuntu for compare" This reverts commit a4ce103d091185471bcd629f6dfa6d1ab97829eb. * reinstall after cache * try different apt cache * use im * use rsvg * change size to avoid downscaling * remove png * do not install librsvg anymore --- .github/workflows/build.yml | 58 ++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 09bf06a2..3bbc6d50 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,10 +1,6 @@ name: Build -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] +on: [push, pull_request] jobs: build: @@ -61,6 +57,27 @@ jobs: cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -G "NMake Makefiles" cmake --build . + - name: Upload Artifact + uses: actions/upload-artifact@master + with: + name: Win32 + path: | + build/ISLE.EXE + build/ISLE.PDB + build/LEGO1.DLL + build/LEGO1.PDB + + compare: + needs: build + runs-on: windows-latest + steps: + - uses: actions/checkout@master + + - uses: actions/download-artifact@master + with: + name: Win32 + path: build + - name: Restore cached original binaries id: cache-original-binaries uses: actions/cache/restore@v3 @@ -103,14 +120,6 @@ jobs: run: | python3 tools/verexp/verexp.py legobin/LEGO1.DLL build/LEGO1.DLL - - name: Upload Artifact - uses: actions/upload-artifact@master - with: - name: Win32 - path: | - build/ISLE.EXE - build/LEGO1.DLL - - name: Upload Artifact uses: actions/upload-artifact@master with: @@ -118,15 +127,30 @@ jobs: path: | ISLEPROGRESS.* LEGO1PROGRESS.* - + + upload: + needs: [build, compare] + runs-on: ubuntu-latest + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + steps: + - uses: actions/checkout@v3 + with: + repository: 'probonopd/uploadtool' + + - uses: actions/download-artifact@master + with: + name: Win32 + path: build + + - uses: actions/download-artifact@master + with: + name: Accuracy Report + - name: Upload Continuous Release - shell: bash - if: github.event_name == 'push' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} UPLOAD_KEY: ${{ secrets.UPLOAD_KEY }} run: | - curl -fLOSs https://raw.githubusercontent.com/probonopd/uploadtool/master/upload.sh ./upload.sh \ build/ISLE.EXE \ build/LEGO1.DLL \