|
| 1 | +name: "External Account Integration" |
| 2 | + |
| 3 | +# Build on pull requests and pushes to `main`. The PR builds will be |
| 4 | +# non-blocking for now, but that is configured elsewhere. |
| 5 | +on: |
| 6 | + pull_request: |
| 7 | + push: |
| 8 | + branches: [ 'main' ] |
| 9 | + |
| 10 | +jobs: |
| 11 | + # A minimal build to validate external account (aka Workload/Workforce |
| 12 | + # Identity Federation, aka WIF, aka BYOID). As the name implies, external |
| 13 | + # accounts support non-Google sources of identity, such as AWS, Azure, or |
| 14 | + # GitHub. Most of our builds use Google Cloud Build (GCB), which is not |
| 15 | + # usable in this case. |
| 16 | + identity-federation-integration-test: |
| 17 | + name: external-account-integration-test |
| 18 | + runs-on: ubuntu-20.04 |
| 19 | + |
| 20 | + steps: |
| 21 | + - name: install ninja |
| 22 | + run: sudo apt install ninja-build |
| 23 | + - uses: 'actions/checkout@v3' |
| 24 | + - name: vcpkg-version |
| 25 | + id: vcpkg-version |
| 26 | + run: | |
| 27 | + echo "version=$(cat ci/etc/vcpkg-version.txt)" >> "${GITHUB_OUTPUT}" |
| 28 | + shell: bash |
| 29 | + - name: clone-vcpkg |
| 30 | + working-directory: "${{runner.temp}}" |
| 31 | + run: | |
| 32 | + mkdir -p vcpkg |
| 33 | + curl -sSL "https://github.com/microsoft/vcpkg/archive/${{ steps.vcpkg-version.outputs.version }}.tar.gz" | |
| 34 | + tar -C vcpkg --strip-components=1 -zxf - |
| 35 | + vcpkg/bootstrap-vcpkg.sh -disableMetrics |
| 36 | + - name: cache-vcpkg |
| 37 | + id: cache-vcpkg |
| 38 | + uses: actions/cache@v3 |
| 39 | + with: |
| 40 | + path: | |
| 41 | + ~/.cache/vcpkg |
| 42 | + key: | |
| 43 | + vcpkg-${{ steps.vcpkg-version.outputs.version }}-${{ hashFiles('vcpkg.json') }} |
| 44 | + restore-keys: | |
| 45 | + vcpkg-${{ steps.vcpkg-version.outputs.version }}- |
| 46 | +
|
| 47 | + # Configuring CMake installs the dependencies from the vcpkg cache, or |
| 48 | + # warms up said cache. |
| 49 | + - name: configure |
| 50 | + run: | |
| 51 | + cmake -G Ninja -S . -B "${{runner.temp}}/build" \ |
| 52 | + -DGOOGLE_CLOUD_CPP_ENABLE=storage,iam \ |
| 53 | + -DCMAKE_TOOLCHAIN_FILE="${{runner.temp}}/vcpkg/scripts/buildsystems/vcpkg.cmake" |
| 54 | +
|
| 55 | + # Later we can add steps tp build tests and run them. |
0 commit comments