fixed binary encoding issue (#17) #24
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: WebFrame CI/CD Pipeline | |
| on: | |
| push: | |
| permissions: | |
| contents: write | |
| packages: write | |
| env: | |
| VCPKG_REF: '2026.01.16' | |
| jobs: | |
| test: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| env: | |
| VCPKG_BINARY_SOURCES: >- | |
| clear;files,${{ github.workspace }}/vcpkg-test-cache,readwrite | |
| steps: | |
| - name: Checkout vcpkg | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: microsoft/vcpkg | |
| path: vcpkg | |
| ref: ${{ env.VCPKG_REF }} | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: maxtek6/WebFrame | |
| path: WebFrame | |
| ref: ${{ github.ref }} | |
| - name: Compute vcpkg cache hash | |
| id: vcpkg-hash | |
| shell: bash | |
| run: | | |
| hash=$(jq -cj '{features,dependencies}' WebFrame/vcpkg.json | cat - WebFrame/vcpkg-configuration.json | sha256sum | awk '{print $1}') | |
| echo "value=${hash}" >> $GITHUB_OUTPUT | |
| - name: "Restore VCPKG cache" | |
| id: restore-test-cache | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: ${{ github.workspace }}/vcpkg-test-cache | |
| key: vcpkg-test-cache-${{ env.VCPKG_REF }}-${{ steps.vcpkg-hash.outputs.value }} | |
| restore-keys: vcpkg-test-cache-${{ env.VCPKG_REF }} | |
| - name: CMake Build | |
| run: | | |
| cmake -S WebFrame -B build -DBUILD_TESTING=ON -DBUILD_RUNTIME=OFF -DVCPKG_ROOT=${{ github.workspace }}/vcpkg | |
| cd build | |
| make -j4 | |
| make test | |
| - name: "Save VCPKG cache" | |
| if: steps.restore-test-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ${{ github.workspace }}/vcpkg-test-cache | |
| key: vcpkg-test-cache-${{ env.VCPKG_REF }}-${{ steps.vcpkg-hash.outputs.value }} | |
| build: | |
| needs: test | |
| name: Build Runtime | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-latest, ubuntu-latest, macos-latest] | |
| env: | |
| VCPKG_BINARY_SOURCES: >- | |
| clear;files,${{ github.workspace }}/vcpkg-${{ matrix.os }},readwrite | |
| steps: | |
| - name: Checkout vcpkg | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: microsoft/vcpkg | |
| path: vcpkg | |
| ref: ${{ env.VCPKG_REF }} | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: maxtek6/WebFrame | |
| path: WebFrame | |
| ref: ${{ github.ref }} | |
| - name: Compute vcpkg cache hash | |
| id: vcpkg-hash | |
| shell: bash | |
| run: | | |
| hash=$(jq -cj '{features,dependencies}' WebFrame/vcpkg.json | cat - WebFrame/vcpkg-configuration.json | sha256sum | awk '{print $1}') | |
| echo "value=${hash}" >> $GITHUB_OUTPUT | |
| - name: "Restore VCPKG cache" | |
| id: restore-build-cache | |
| uses: actions/cache/restore@v5 | |
| with: | |
| path: ${{ github.workspace }}/vcpkg-${{ matrix.os }} | |
| key: vcpkg-${{ matrix.os }}-${{ env.VCPKG_REF }}-${{ steps.vcpkg-hash.outputs.value }} | |
| restore-keys: vcpkg-${{ matrix.os }}-${{ env.VCPKG_REF }} | |
| - name: Ubuntu setup | |
| if: matrix.os == 'ubuntu-latest' | |
| run: ./WebFrame/.github/scripts/ubuntu_setup.sh | |
| - name: MacOS setup | |
| if: matrix.os == 'macos-latest' | |
| run: ./WebFrame/.github/scripts/osx_setup.sh | |
| - name: CMake Build | |
| run: | | |
| cmake -S WebFrame -B build -DBUILD_TESTING=OFF -DBUILD_RUNTIME=ON -DVCPKG_ROOT=${{ github.workspace }}/vcpkg | |
| cmake --build build | |
| - name: "Save VCPKG cache" | |
| if: steps.restore-build-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v5 | |
| with: | |
| path: ${{ github.workspace }}/vcpkg-${{ matrix.os }} | |
| key: vcpkg-${{ matrix.os }}-${{ env.VCPKG_REF }}-${{ steps.vcpkg-hash.outputs.value }} |