|
| 1 | +name: "Ubuntu" |
| 2 | + |
| 3 | +on: [push, workflow_dispatch] |
| 4 | + |
| 5 | +env: |
| 6 | + VCPKG_FEATURE_FLAGS: "registries,binarycaching,manifests,versions" |
| 7 | + |
| 8 | +jobs: |
| 9 | + overlay: |
| 10 | + # check https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md |
| 11 | + runs-on: "ubuntu-22.04" |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + include: |
| 15 | + - vcpkg_tag: "2024.01.12" |
| 16 | + vcpkg_commit: "53bef8994c541b6561884a8395ea35715ece75db" |
| 17 | + fail-fast: false |
| 18 | + env: |
| 19 | + VCPKG_OVERLAY_PORTS: "${{ github.workspace }}/ports" |
| 20 | + VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/triplets |
| 21 | + steps: |
| 22 | + - uses: actions/checkout@v4 |
| 23 | + |
| 24 | + - uses: ConorMacBride/install-package@v1 |
| 25 | + with: |
| 26 | + apt: nuget nasm libnuma-dev libopenmpi-dev libx11-dev libxi-dev libxext-dev libx11-xcb-dev |
| 27 | + |
| 28 | + - name: "create cache folders" |
| 29 | + run: | |
| 30 | + mkdir -p ${VCPKG_DOWNLOADS} |
| 31 | + mkdir -p ${VCPKG_DEFAULT_BINARY_CACHE} |
| 32 | + env: |
| 33 | + VCPKG_DOWNLOADS: "${{ runner.temp }}/vcpkg-downloads" |
| 34 | + VCPKG_DEFAULT_BINARY_CACHE: "${{ runner.temp }}/vcpkg-archives" |
| 35 | + |
| 36 | + - uses: actions/cache@v3.3.2 |
| 37 | + with: |
| 38 | + key: "x64-linux-${{ matrix.vcpkg_tag }}" |
| 39 | + path: | |
| 40 | + ${{ runner.temp }}/vcpkg-downloads |
| 41 | + ${{ runner.temp }}/vcpkg-archives |
| 42 | +
|
| 43 | + - uses: lukka/run-vcpkg@v11.3 |
| 44 | + with: |
| 45 | + vcpkgDirectory: "/usr/local/share/vcpkg" |
| 46 | + doNotUpdateVcpkg: true |
| 47 | + vcpkgGitCommitId: "${{ matrix.vcpkg_commit }}" |
| 48 | + vcpkgJsonGlob: "test/vcpkg.json" |
| 49 | + runVcpkgInstall: true |
| 50 | + runVcpkgFormatString: '[`install`, `--clean-buildtrees-after-build`, `--clean-packages-after-build`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`]' |
| 51 | + env: |
| 52 | + VCPKG_DEFAULT_TRIPLET: "x64-linux" |
| 53 | + VCPKG_BINARY_SOURCES: "default" |
| 54 | + VCPKG_DOWNLOADS: "${{ runner.temp }}/vcpkg-downloads" |
| 55 | + VCPKG_DEFAULT_BINARY_CACHE: "${{ runner.temp }}/vcpkg-archives" |
0 commit comments