|
| 1 | +name: End-to-End cloud service tests |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + inputs: |
| 5 | + run_azure: |
| 6 | + description: 'Run Azure tests' |
| 7 | + required: true |
| 8 | + default: true |
| 9 | + type: boolean |
| 10 | + push: |
| 11 | + branches: |
| 12 | + - dev |
| 13 | + - release-* |
| 14 | + |
| 15 | +env: |
| 16 | + VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite' |
| 17 | + SCCACHE_GHA_ENABLED: "true" |
| 18 | + |
| 19 | +jobs: |
| 20 | + azure: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + if: inputs.run_azure != 'false' |
| 23 | + environment: azure-e2e-test |
| 24 | + env: |
| 25 | + bootstrap_args: --enable-azure --enable-ccache |
| 26 | + permissions: |
| 27 | + id-token: write # Get OIDC token for authentication to Azure |
| 28 | + name: Azure |
| 29 | + steps: |
| 30 | + - uses: actions/checkout@v4 |
| 31 | + with: |
| 32 | + fetch-depth: 0 |
| 33 | + |
| 34 | + # Configure required environment variables for vcpkg to use |
| 35 | + # GitHub's Action Cache |
| 36 | + - uses: actions/github-script@v7 |
| 37 | + with: |
| 38 | + script: | |
| 39 | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); |
| 40 | + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); |
| 41 | +
|
| 42 | + - name: Prevent vpckg from building debug variants |
| 43 | + run: python ./scripts/ci/patch_vcpkg_triplets.py |
| 44 | + |
| 45 | + - name: Setup sccache |
| 46 | + uses: mozilla-actions/[email protected] |
| 47 | + |
| 48 | + - name: 'Configure libtiledb' |
| 49 | + id: configure |
| 50 | + shell: bash |
| 51 | + run: | |
| 52 | + set -e pipefail |
| 53 | +
|
| 54 | + # Show CMake Version |
| 55 | + cmake --version |
| 56 | +
|
| 57 | + source $GITHUB_WORKSPACE/scripts/ci/bootstrap_libtiledb.sh |
| 58 | +
|
| 59 | + - name: 'Build libtiledb' |
| 60 | + id: build |
| 61 | + shell: bash |
| 62 | + run: | |
| 63 | + set -e pipefail |
| 64 | +
|
| 65 | + ##################################################### |
| 66 | + # Build libtiledb using previous bootstrap |
| 67 | +
|
| 68 | + source $GITHUB_WORKSPACE/scripts/ci/build_libtiledb.sh |
| 69 | +
|
| 70 | + - name: 'Az CLI login' |
| 71 | + uses: azure/login@v2 |
| 72 | + with: |
| 73 | + client-id: ${{ secrets.AZURE_CLIENT_ID }} |
| 74 | + tenant-id: ${{ secrets.AZURE_TENANT_ID }} |
| 75 | + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} |
| 76 | + |
| 77 | + - name: 'Test libtiledb' |
| 78 | + id: test |
| 79 | + shell: bash |
| 80 | + env: |
| 81 | + # Allow forks to specify different values. |
| 82 | + AZURE_STORAGE_ACCOUNT: ${{ vars.AZURE_STORAGE_ACCOUNT || 'tiledbci' }} |
| 83 | + TILEDB_VFS_E2E_TEST_FILE: ${{ vars.AZURE_E2E_TEST_FILE || 'azure://tiledb/test.txt' }} |
| 84 | + run: | |
| 85 | + set -e pipefail |
| 86 | +
|
| 87 | + cd $GITHUB_WORKSPACE/build |
| 88 | +
|
| 89 | + ################################################### |
| 90 | + # Run tests |
| 91 | +
|
| 92 | + # Bypass Catch2 Framework stdout interception with awk on test output |
| 93 | + ./tiledb/test/tiledb_unit -d yes "[vfs-e2e]" | awk '/1: ::set-output/{sub(/.*1: /, ""); print; next} 1' |
| 94 | +
|
| 95 | + - name: 'Test status check' |
| 96 | + run: | |
| 97 | + # tiledb_unit is configured to set a variable TILEDB_CI_SUCCESS=1 |
| 98 | + # following the test run. If this variable is not set, the build should fail. |
| 99 | + # see https://github.com/TileDB-Inc/TileDB/pull/1400 (5f0623f4d3) |
| 100 | + if [[ "${{ steps.test.outputs.TILEDB_CI_SUCCESS }}" -ne 1 ]]; then |
| 101 | + exit 1; |
| 102 | + fi |
| 103 | +
|
| 104 | + - name: "Print log files (failed build only)" |
| 105 | + run: | |
| 106 | + source $GITHUB_WORKSPACE/scripts/ci/print_logs.sh |
| 107 | + if: ${{ failure() }} # only run this job if the build step failed |
0 commit comments