Docker updates #4
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: | |
| build-docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| tags: vcpkg-build | |
| outputs: type=docker,dest=/tmp/vcpkg-build.tar | |
| - name: Compress docker image | |
| run: zstd /tmp/vcpkg-build.tar -o vcpkg-build.tar.zst | |
| - name: Upload docker image | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: vcpkg-build.tar.zst | |
| name: vcpkg-build.tar.zst | |
| compression-level: 0 | |
| download: | |
| needs: build-docker | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| arch: [arm, arm64, x64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download All Artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: vcpkg-build.tar.zst | |
| - name: Load image | |
| run: | | |
| zstd -d vcpkg-build.tar.zst/vcpkg-build.tar.zst | |
| docker load --input vcpkg-build.tar.zst/vcpkg-build.tar | |
| - name: Build ${{ matrix.arch }} libraries | |
| run: docker run -v $(pwd)/project:/project -t vcpkg-build vcpkg install --triplet ${{ matrix.arch }}-android-dynamic | |
| - name: Archive libraries | |
| run: tar -c --zstd -f ${{ matrix.arch }}-android-dynamic.tar.zst -C project/vcpkg_installed/ ${{ matrix.arch }}-android-dynamic | |
| - name: Upload libraries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: ${{ matrix.arch }}-android-dynamic.tar.zst | |
| name: ${{ matrix.arch }}-android-dynamic.tar.zst | |
| compression-level: 1 |