diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae3a397f..54f4c7cd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -155,6 +155,80 @@ jobs: name: bin-wasm-${{ fromJSON(matrix.config).tfm }} path: cb/bld/bin + test: + needs: [ build, build-wasm] + if: ${{ github.event_name == 'pull_request' }} + strategy: + matrix: + # TODO want macos-latest here too, but the build currently fails there + os: [windows-2019] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: + path: "cb" + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + repository: ericsink/SQLitePCL.raw + path: "SQLitePCL.raw" + - name: Clean output directory + if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos') + run: rm -fr bin + working-directory: cb/bld + - name: Clean output directory + if: startsWith(matrix.os, 'windows') + run: rm bin -r -fo + working-directory: cb/bld + - uses: actions/download-artifact@v4 + with: + name: bin-ubuntu-20.04 + path: cb/bld/bin + - uses: actions/download-artifact@v4 + with: + name: bin-macos-latest + path: cb/bld/bin + - uses: actions/download-artifact@v4 + with: + name: bin-windows-2019 + path: cb/bld/bin + - uses: actions/download-artifact@v4 + with: + name: bin-wasm-net6.0 + path: cb/bld/bin + - uses: actions/download-artifact@v4 + with: + name: bin-wasm-net7.0 + path: cb/bld/bin + - uses: actions/download-artifact@v4 + with: + name: bin-wasm-net8.0 + path: cb/bld/bin + # note that the following is mostly a copy of the build script from the SQLitePCL.raw repo + - name: "Set up Java: 11" + uses: actions/setup-java@v1 + with: + java-version: 11 + - name: Setup Android SDK 27, 28, 29 and 30 + uses: android-actions/setup-android@v3 + with: + cmdline-tools-version: 9123335 + - run: sdkmanager tools "platforms;android-27" "platforms;android-28" "platforms;android-29" "platforms;android-30" + - name: Install workload ios + run: dotnet workload install ios + - name: Install workload maccatalyst + run: dotnet workload install maccatalyst + - name: Install workload android + run: dotnet workload install android + - name: Install workload tvos + run: dotnet workload install tvos + - name: Install T4 + run: dotnet tool install --global dotnet-t4 + - name: Build + run: | + cd SQLitePCL.raw/build + dotnet run + publish: needs: [ build, build-wasm ] if: ${{ github.event_name == 'push' }}