77 required : true
88 description : " The ref we want to compile"
99 type : string
10+ push :
11+ branches :
12+ - " ci-gha-*"
13+ schedule :
14+ - cron : ' 0 4 * * *'
1015
1116permissions :
1217 contents : read
@@ -26,56 +31,27 @@ jobs:
2631 id-token : write
2732
2833 steps :
29- - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
34+ - uses : actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
3035 with :
31- ref : ${{ inputs.checkout-ref }}
32- - id : auth
33- uses : google-github-actions/auth@v2
34- with :
35- create_credentials_file : true
36- credentials_json : ${{ secrets.BUILD_CACHE_KEY }}
37- - name : Set up Cloud SDK
38- uses : google-github-actions/setup-gcloud@v2
39- - name : vcpkg-version
40- id : vcpkg-version
41- run : |
42- echo "version=$(cat ci/etc/vcpkg-version.txt)" >> "${GITHUB_OUTPUT}"
43- shell : bash
44- - name : install ninja and CMake
45- run : |
46- rm /usr/local/bin/cmake
47- sudo apt install ninja-build cmake
48- - name : download-sccache
49- working-directory : " ${{runner.temp}}"
50- run : |
51- curl -fsSL https://github.com/mozilla/sccache/releases/download/v0.7.1/sccache-v0.7.1-x86_64-unknown-linux-musl.tar.gz | \
52- tar -zxf - --strip-components=1 && \
53- sudo mv sccache /usr/bin/sccache && \
54- sudo chmod +x /usr/bin/sccache
55- - name : download-vcpkg
56- working-directory : " ${{runner.temp}}"
57- run : |
58- mkdir -p vcpkg
59- curl -fsSL "https://github.com/microsoft/vcpkg/archive/${{ steps.vcpkg-version.outputs.version }}.tar.gz" |
60- tar -C vcpkg --strip-components=1 -zxf -
61- vcpkg/bootstrap-vcpkg.sh -disableMetrics
62- # First compile the code using the identity with access to the build cache
63- - run : |
64- env VCPKG_ROOT="${{ runner.temp }}/vcpkg" ci/gha/builds/external-account.sh
65- # Then switch to the BYOID identity and run the integration test
36+ ref : ${{ inputs.checkout-ref || github.sha }}
37+ # Use BYOID identity and run the integration test
6638 - id : byoid-auth
6739 if : ' !github.event.pull_request.head.repo.fork'
6840 name : ' Authenticate to GCP'
69- uses : ' google-github-actions/auth@v2 '
41+ uses : ' google-github-actions/auth@v3 '
7042 with :
7143 create_credentials_file : true
7244 workload_identity_provider : ' projects/49427430084/locations/global/workloadIdentityPools/github-wif-pool/providers/github-wif-provider'
7345 service_account : ' github-actions@cloud-cpp-identity-federation.iam.gserviceaccount.com'
74- - run : |
75- ctest --test-dir cmake-out --output-on-failure -R common_internal_external_account_integration_test
76- env :
77- SCCACHE_GCS_BUCKET : cloud-cpp-gha-cache
78- SCCACHE_GCS_KEY_PREFIX : sccache/ubuntu-22.04/${{ github.job }}
79- SCCACHE_GCS_RW_MODE : READ_WRITE
80- SCCACHE_IGNORE_SERVER_IO_ERROR : 1
81- VCPKG_BINARY_SOURCES : x-gcs,gs://cloud-cpp-gha-cache/vcpkg-cache/ubuntu-22.04/${{ github.job }},readwrite
46+ - name : Run integration tests
47+ if : ' !github.event.pull_request.head.repo.fork'
48+ run : |
49+ bazelisk test \
50+ --test_output=all \
51+ --verbose_failures=true \
52+ --keep_going \
53+ --experimental_convenience_symlinks=ignore \
54+ --remote_upload_local_results=false \
55+ --test_env=GOOGLE_APPLICATION_CREDENTIALS="${GOOGLE_APPLICATION_CREDENTIALS}" \
56+ --test_env=GOOGLE_CLOUD_CPP_TEST_WIF_BUCKET="cloud-cpp-wif-test-bucket" \
57+ //google/cloud:internal_external_account_integration_test
0 commit comments