Support reading palette arrays as well as palette images (#9) #203
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [push, pull_request] | |
| jobs: | |
| alpine: | |
| name: Alpine | |
| runs-on: ubuntu-latest | |
| container: alpine | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [x64] | |
| steps: | |
| - name: Prepare environment | |
| run: apk add bash cmake ninja g++ libpng-dev nlohmann-json gtest-dev | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build libsawyer | |
| run: ./build.sh libsawyer | |
| - name: Test libsawyer | |
| run: ./run-tests | |
| - name: Build fsaw | |
| run: ./build.sh fsaw | |
| - name: Build gxc | |
| run: ./build.sh gxc | |
| - name: Package tools | |
| run: ./build.sh tools | |
| - name: Upload libsawyer | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: libsawyer-musl-${{ matrix.platform }}.tar.gz | |
| path: artefacts/libsawyer-musl-${{ matrix.platform }}.tar.gz | |
| if-no-files-found: error | |
| - name: Upload tools | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: libsawyer-tools-musl-${{ matrix.platform }}.tar.gz | |
| path: artefacts/libsawyer-tools-musl-${{ matrix.platform }}.tar.gz | |
| if-no-files-found: error | |
| ubuntu: | |
| name: Ubuntu | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [x64] | |
| steps: | |
| - name: Prepare environment | |
| run: sudo apt-get update && sudo apt-get install ninja-build libpng-dev nlohmann-json3-dev libgtest-dev | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build libsawyer | |
| run: ./build.sh libsawyer | |
| - name: Test libsawyer | |
| run: ./run-tests | |
| - name: Build fsaw | |
| run: ./build.sh fsaw | |
| - name: Build gxc | |
| run: ./build.sh gxc | |
| - name: Package tools | |
| run: ./build.sh tools | |
| - name: Upload libsawyer | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: libsawyer-linux-${{ matrix.platform }}.tar.gz | |
| path: artefacts/libsawyer-linux-${{ matrix.platform }}.tar.gz | |
| if-no-files-found: error | |
| - name: Upload tools | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: libsawyer-tools-linux-${{ matrix.platform }}.tar.gz | |
| path: artefacts/libsawyer-tools-linux-${{ matrix.platform }}.tar.gz | |
| if-no-files-found: error | |
| windows-shared: | |
| name: "Windows[shared]" | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: x86 | |
| arch: x86 | |
| - platform: x64 | |
| arch: amd64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Cache vcpkg | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-vcpkg | |
| with: | |
| path: C:/vcpkg | |
| key: ${{ runner.os }}-build-${{ env.cache-name }} | |
| - name: Build libsawyer | |
| shell: cmd | |
| run: | | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }} | |
| sh build.sh libsawyer -p ${{ matrix.platform }} | |
| - name: Test libsawyer | |
| shell: cmd | |
| run: | | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }} | |
| sh run-tests | |
| - name: Upload libsawyer | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: libsawyer-win-${{ matrix.platform }}.zip | |
| path: artefacts/libsawyer-win-${{ matrix.platform }}.zip | |
| if-no-files-found: error | |
| windows-static: | |
| name: "Windows[static]" | |
| runs-on: windows-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: x86 | |
| arch: x86 | |
| - platform: x64 | |
| arch: amd64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Cache vcpkg | |
| uses: actions/cache@v5 | |
| env: | |
| cache-name: cache-vcpkg | |
| with: | |
| path: C:/vcpkg | |
| key: ${{ runner.os }}-build-${{ env.cache-name }} | |
| - name: Build libsawyer | |
| shell: cmd | |
| run: | | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }} | |
| sh build.sh libsawyer -p ${{ matrix.platform }} --static | |
| - name: Build fsaw | |
| if: matrix.platform == 'x64' | |
| shell: cmd | |
| run: | | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }} | |
| sh build.sh fsaw --static | |
| - name: Build gxc | |
| if: matrix.platform == 'x64' | |
| shell: cmd | |
| run: | | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }} | |
| sh build.sh gxc --static | |
| - name: Package tools | |
| if: matrix.platform == 'x64' | |
| shell: cmd | |
| run: | | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" -arch=${{ matrix.arch }} | |
| sh build.sh tools --static | |
| - name: Upload libsawyer | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: libsawyer-win-${{ matrix.platform }}-static.zip | |
| path: artefacts/libsawyer-win-${{ matrix.platform }}-static.zip | |
| if-no-files-found: error | |
| - name: Upload tools | |
| if: matrix.platform == 'x64' | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: libsawyer-tools-win-${{ matrix.platform }}.zip | |
| path: artefacts/libsawyer-tools-win-${{ matrix.platform }}.zip | |
| if-no-files-found: error | |
| deploy: | |
| name: "Deploy" | |
| needs: [alpine, ubuntu, windows-shared, windows-static] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get artefacts | |
| uses: actions/download-artifact@v7 | |
| with: | |
| path: artefacts | |
| - name: Flatten tree structure | |
| run: cd artefacts && mv */* .. && cd .. && rm -rf artefacts && ls -al | |
| - name: Create release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| with: | |
| files: "*" |