|
| 1 | +name: Continuous Integration AL4 |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + - cron: "0 0 * * 1-5" |
| 6 | + pull_request: |
| 7 | + workflow_dispatch: |
| 8 | + |
| 9 | +concurrency: |
| 10 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 11 | + cancel-in-progress: ${{ !contains(github.ref, 'main')}} |
| 12 | + |
| 13 | +permissions: read-all |
| 14 | + |
| 15 | +jobs: |
| 16 | + vmss-virtual-a: |
| 17 | + name: "AL4 VMSS Virtual A" # Debug build, unit tests, e2e (bucket_a) |
| 18 | + runs-on: |
| 19 | + [ |
| 20 | + self-hosted, |
| 21 | + 1ES.Pool=gha-vmss-d16av5-ci, |
| 22 | + "JobId=ci_al4_build_test_virtual_a-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}", |
| 23 | + ] |
| 24 | + container: |
| 25 | + image: azlpubstagingacroxz2o4gw.azurecr.io/azurelinux/base/core:4.0 |
| 26 | + options: --user root --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE |
| 27 | + |
| 28 | + steps: |
| 29 | + - name: "Checkout dependencies" |
| 30 | + shell: bash |
| 31 | + run: | |
| 32 | + set -ex |
| 33 | + dnf -y update |
| 34 | + dnf -y install ca-certificates git |
| 35 | +
|
| 36 | + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 37 | + with: |
| 38 | + fetch-depth: 0 |
| 39 | + |
| 40 | + - name: "Install dependencies" |
| 41 | + shell: bash |
| 42 | + run: | |
| 43 | + set -ex |
| 44 | + ./scripts/setup-ci-al4.sh |
| 45 | +
|
| 46 | + - name: "Build Debug" |
| 47 | + run: | |
| 48 | + set -ex |
| 49 | + git config --global --add safe.directory /__w/CCF/CCF |
| 50 | + mkdir build |
| 51 | + cd build |
| 52 | + cmake -GNinja -DCMAKE_BUILD_TYPE=Debug .. |
| 53 | + ninja |
| 54 | + shell: bash |
| 55 | + |
| 56 | + - name: "Run Unit tests" |
| 57 | + run: | |
| 58 | + set -ex |
| 59 | + cd build |
| 60 | + ./tests.sh --output-on-failure -L unit -j$(nproc --all) |
| 61 | + shell: bash |
| 62 | + |
| 63 | + - name: "Run e2e tests (bucket_a)" |
| 64 | + run: | |
| 65 | + set -ex |
| 66 | + cd build |
| 67 | + ./tests.sh --timeout 360 --output-on-failure -L bucket_a -LE lts_compatibility |
| 68 | + shell: bash |
| 69 | + |
| 70 | + - name: "Upload logs for AL4 virtual A" |
| 71 | + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 |
| 72 | + with: |
| 73 | + name: logs-al4-virtual-a |
| 74 | + path: | |
| 75 | + build/workspace/*/*.config.json |
| 76 | + build/workspace/*/out |
| 77 | + build/workspace/*/err |
| 78 | + build/workspace/*/*.ledger/* |
| 79 | + build/workspace/*/stack_trace |
| 80 | + if-no-files-found: ignore |
| 81 | + if: success() || failure() |
| 82 | + |
| 83 | + vmss-virtual-b: |
| 84 | + name: "AL4 VMSS Virtual B" # End-to-end tests (bucket_b) |
| 85 | + runs-on: |
| 86 | + [ |
| 87 | + self-hosted, |
| 88 | + 1ES.Pool=gha-vmss-d16av5-ci, |
| 89 | + "JobId=ci_al4_build_test_virtual_b-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}", |
| 90 | + ] |
| 91 | + container: |
| 92 | + image: azlpubstagingacroxz2o4gw.azurecr.io/azurelinux/base/core:4.0 |
| 93 | + options: --user root --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE --sysctl net.ipv6.conf.all.disable_ipv6=0 --sysctl net.ipv6.conf.default.disable_ipv6=0 --sysctl net.ipv6.conf.lo.disable_ipv6=0 |
| 94 | + |
| 95 | + steps: |
| 96 | + - name: "Checkout dependencies" |
| 97 | + shell: bash |
| 98 | + run: | |
| 99 | + set -ex |
| 100 | + dnf -y update |
| 101 | + dnf -y install ca-certificates git |
| 102 | +
|
| 103 | + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 104 | + with: |
| 105 | + fetch-depth: 0 |
| 106 | + |
| 107 | + - name: "cpuinfo" |
| 108 | + run: | |
| 109 | + cat /proc/cpuinfo |
| 110 | + shell: bash |
| 111 | + |
| 112 | + - name: "Install dependencies" |
| 113 | + shell: bash |
| 114 | + run: | |
| 115 | + set -ex |
| 116 | + ./scripts/setup-ci-al4.sh |
| 117 | +
|
| 118 | + - name: "Confirm running on Virtual" |
| 119 | + run: | |
| 120 | + set -ex |
| 121 | + python3 tests/infra/platform_detection.py virtual |
| 122 | + shell: bash |
| 123 | + |
| 124 | + - name: "Build Debug" |
| 125 | + run: | |
| 126 | + set -ex |
| 127 | + git config --global --add safe.directory /__w/CCF/CCF |
| 128 | + mkdir build |
| 129 | + cd build |
| 130 | + cmake -GNinja -DCMAKE_BUILD_TYPE=Debug .. |
| 131 | + ninja |
| 132 | + shell: bash |
| 133 | + |
| 134 | + - name: "Run e2e tests (bucket_b)" |
| 135 | + run: | |
| 136 | + set -ex |
| 137 | + cd build |
| 138 | + rm -rf /github/home/.cache |
| 139 | + mkdir -p /github/home/.cache |
| 140 | +
|
| 141 | + ./tests.sh --timeout 360 --output-on-failure -L bucket_b |
| 142 | + shell: bash |
| 143 | + |
| 144 | + - name: "Upload logs for AL4 virtual B" |
| 145 | + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 |
| 146 | + with: |
| 147 | + name: logs-al4-virtual-b |
| 148 | + path: | |
| 149 | + build/workspace/*/*.config.json |
| 150 | + build/workspace/*/out |
| 151 | + build/workspace/*/err |
| 152 | + build/workspace/*/*.ledger/* |
| 153 | + build/workspace/*/stack_trace |
| 154 | + if-no-files-found: ignore |
| 155 | + if: success() || failure() |
| 156 | + |
| 157 | + vmss-virtual-c: |
| 158 | + name: "AL4 VMSS Virtual C" # End-to-end tests (bucket_c) |
| 159 | + runs-on: |
| 160 | + [ |
| 161 | + self-hosted, |
| 162 | + 1ES.Pool=gha-vmss-d16av5-ci, |
| 163 | + "JobId=ci_al4_build_test_virtual_c-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}", |
| 164 | + ] |
| 165 | + container: |
| 166 | + image: azlpubstagingacroxz2o4gw.azurecr.io/azurelinux/base/core:4.0 |
| 167 | + options: --user root --publish-all --cap-add NET_ADMIN --cap-add NET_RAW --cap-add SYS_PTRACE --sysctl net.ipv6.conf.all.disable_ipv6=0 --sysctl net.ipv6.conf.default.disable_ipv6=0 --sysctl net.ipv6.conf.lo.disable_ipv6=0 |
| 168 | + |
| 169 | + steps: |
| 170 | + - name: "Checkout dependencies" |
| 171 | + shell: bash |
| 172 | + run: | |
| 173 | + set -ex |
| 174 | + dnf -y update |
| 175 | + dnf -y install ca-certificates git |
| 176 | +
|
| 177 | + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 |
| 178 | + with: |
| 179 | + fetch-depth: 0 |
| 180 | + |
| 181 | + - name: "Install dependencies" |
| 182 | + shell: bash |
| 183 | + run: | |
| 184 | + set -ex |
| 185 | + ./scripts/setup-ci-al4.sh |
| 186 | +
|
| 187 | + - name: "Build Debug" |
| 188 | + run: | |
| 189 | + set -ex |
| 190 | + git config --global --add safe.directory /__w/CCF/CCF |
| 191 | + mkdir build |
| 192 | + cd build |
| 193 | + cmake -GNinja -DCMAKE_BUILD_TYPE=Debug .. |
| 194 | + ninja |
| 195 | + shell: bash |
| 196 | + |
| 197 | + - name: "Run e2e tests (bucket_c)" |
| 198 | + run: | |
| 199 | + set -ex |
| 200 | + cd build |
| 201 | + rm -rf /github/home/.cache |
| 202 | + mkdir -p /github/home/.cache |
| 203 | +
|
| 204 | + ./tests.sh --timeout 360 --output-on-failure -L bucket_c |
| 205 | + shell: bash |
| 206 | + |
| 207 | + - name: "Upload logs for AL4 virtual C" |
| 208 | + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 |
| 209 | + with: |
| 210 | + name: logs-al4-virtual-c |
| 211 | + path: | |
| 212 | + build/workspace/*/*.config.json |
| 213 | + build/workspace/*/out |
| 214 | + build/workspace/*/err |
| 215 | + build/workspace/*/*.ledger/* |
| 216 | + build/workspace/*/stack_trace |
| 217 | + if-no-files-found: ignore |
| 218 | + if: success() || failure() |
0 commit comments