|
73 | 73 | gcp_credentials: "${{ secrets.GCP_CREDENTIALS }}" |
74 | 74 | github_runner_token: "${{ secrets.GH_RUNNER_TOKEN }}" |
75 | 75 |
|
| 76 | + linux-test-vm: |
| 77 | + runs-on: ubuntu-24.04 |
| 78 | + environment: Credentials |
| 79 | + needs: [ linux-build-opt ] |
| 80 | + outputs: |
| 81 | + instance_name: ${{ steps.create_vm.outputs.instance_name }} |
| 82 | + |
| 83 | + permissions: |
| 84 | + contents: 'read' |
| 85 | + id-token: 'write' |
| 86 | + |
| 87 | + steps: |
| 88 | + - uses: actions/checkout@v5 |
| 89 | + with: |
| 90 | + sparse-checkout: | |
| 91 | + .github/actions/ |
| 92 | + sparse-checkout-cone-mode: false |
| 93 | + |
| 94 | + - id: create_vm |
| 95 | + uses: ./.github/actions/create-vm |
| 96 | + with: |
| 97 | + instance_kind: "linux-test" |
| 98 | + gcp_machine_type: "c4d-standard-2" |
| 99 | + gcp_provisioning_model: "STANDARD" |
| 100 | + extra_labels: "test,LinuxNative" |
| 101 | + gcp_credentials: "${{ secrets.GCP_CREDENTIALS }}" |
| 102 | + github_runner_token: "${{ secrets.GH_RUNNER_TOKEN }}" |
| 103 | + |
| 104 | + linux-test-vm-clean: |
| 105 | + runs-on: ubuntu-24.04 |
| 106 | + environment: Credentials |
| 107 | + needs: [ linux-test-vm, linux-test ] |
| 108 | + if: "always()" |
| 109 | + |
| 110 | + permissions: |
| 111 | + contents: 'read' |
| 112 | + id-token: 'write' |
| 113 | + |
| 114 | + steps: |
| 115 | + - uses: actions/checkout@v5 |
| 116 | + with: |
| 117 | + sparse-checkout: | |
| 118 | + .github/actions/ |
| 119 | + sparse-checkout-cone-mode: false |
| 120 | + |
| 121 | + - id: delete_vm |
| 122 | + uses: ./.github/actions/delete-vm |
| 123 | + with: |
| 124 | + instance_name: ${{ needs.linux-test-vm.outputs.instance_name }} |
| 125 | + gcp_credentials: "${{ secrets.GCP_CREDENTIALS }}" |
| 126 | + github_runner_token: "${{ secrets.GH_RUNNER_TOKEN }}" |
| 127 | + |
76 | 128 | linux-build-opt: |
77 | 129 | runs-on: [ self-hosted, LinuxNative, X64 ] |
78 | 130 | needs: linux-build-vm |
@@ -103,6 +155,46 @@ jobs: |
103 | 155 | path: obj-*/dist/firefox-*.tar* |
104 | 156 | compression-level: 0 |
105 | 157 |
|
| 158 | + linux-test: |
| 159 | + runs-on: [self-hosted, LinuxNative, X64] |
| 160 | + needs: [ linux-test-vm, package-tests ] |
| 161 | + |
| 162 | + steps: |
| 163 | + - name: "download firefox build" |
| 164 | + uses: actions/download-artifact@v5 |
| 165 | + with: |
| 166 | + name: firefox-linux-amd64 |
| 167 | + |
| 168 | + - name: "download enterprise tests" |
| 169 | + uses: actions/download-artifact@v5 |
| 170 | + with: |
| 171 | + name: enterprise-tests |
| 172 | + |
| 173 | + - name: "unpack firefox build" |
| 174 | + id: unpack |
| 175 | + run: | |
| 176 | + tar xf ./obj-*/dist/firefox-*.tar* |
| 177 | + RUNTIME_PATH=$(find . -type f -name "firefox") |
| 178 | + echo "runtime_path=$RUNTIME_PATH" >> "$GITHUB_OUTPUT" |
| 179 | +
|
| 180 | + - name: "install python" |
| 181 | + run: | |
| 182 | + python3 -m venv venv_tests |
| 183 | +
|
| 184 | + - name: "install deps" |
| 185 | + run: | |
| 186 | + curl -sSL https://github.com/mozilla/geckodriver/releases/download/v0.36.0/geckodriver-v0.36.0-linux64.tar.gz | tar -zxf - |
| 187 | + . venv_tests/bin/activate |
| 188 | + pip3 install -r requirements.txt |
| 189 | +
|
| 190 | + - name: "run tests" |
| 191 | + run: | |
| 192 | + RUNTIME_VERSION=$(${{ steps.unpack.outputs.runtime_path }} --version | awk '{ print $3 }') |
| 193 | + sed -e "s/#RUNTIME_VERSION#/${RUNTIME_VERSION}/g" < expectations.json.in > expectations.json |
| 194 | + mkdir -p ./profiles/ |
| 195 | + . venv_tests/bin/activate |
| 196 | + python3 test_firefox_start.py expectations.json ${{ steps.unpack.outputs.runtime_path }} $PWD/geckodriver $PWD/profiles/ |
| 197 | +
|
106 | 198 | windows-build-vm: |
107 | 199 | runs-on: ubuntu-24.04 |
108 | 200 | environment: Credentials |
@@ -152,6 +244,61 @@ jobs: |
152 | 244 | gcp_credentials: "${{ secrets.GCP_CREDENTIALS }}" |
153 | 245 | github_runner_token: "${{ secrets.GH_RUNNER_TOKEN }}" |
154 | 246 |
|
| 247 | + windows-test-vm: |
| 248 | + runs-on: ubuntu-24.04 |
| 249 | + environment: Credentials |
| 250 | + needs: [ windows-build-opt ] |
| 251 | + outputs: |
| 252 | + instance_name: ${{ steps.create_vm.outputs.instance_name }} |
| 253 | + |
| 254 | + permissions: |
| 255 | + contents: 'read' |
| 256 | + id-token: 'write' |
| 257 | + |
| 258 | + steps: |
| 259 | + - uses: actions/checkout@v5 |
| 260 | + with: |
| 261 | + sparse-checkout: | |
| 262 | + .github/actions/ |
| 263 | + sparse-checkout-cone-mode: false |
| 264 | + |
| 265 | + - id: create_vm |
| 266 | + uses: ./.github/actions/create-vm |
| 267 | + with: |
| 268 | + instance_kind: "windows-test" |
| 269 | + gcp_machine_type: "c4d-standard-2" |
| 270 | + gcp_provisioning_model: "STANDARD" |
| 271 | + gcp_disk_size: "100" |
| 272 | + gcp_disk_source: "disk-2025-dc-v20250813-20250902102015" |
| 273 | + gcp_metadata_startup: "--metadata-from-file=windows-startup-script-ps1=./repo-checkout/.github/workflows/windows-startup.ps1" |
| 274 | + extra_labels: "test,WinNative" |
| 275 | + gcp_credentials: "${{ secrets.GCP_CREDENTIALS }}" |
| 276 | + github_runner_token: "${{ secrets.GH_RUNNER_TOKEN }}" |
| 277 | + |
| 278 | + windows-test-vm-clean: |
| 279 | + runs-on: ubuntu-24.04 |
| 280 | + environment: Credentials |
| 281 | + needs: [ windows-test-vm, windows-test ] |
| 282 | + if: "always()" |
| 283 | + |
| 284 | + permissions: |
| 285 | + contents: 'read' |
| 286 | + id-token: 'write' |
| 287 | + |
| 288 | + steps: |
| 289 | + - uses: actions/checkout@v5 |
| 290 | + with: |
| 291 | + sparse-checkout: | |
| 292 | + .github/actions/ |
| 293 | + sparse-checkout-cone-mode: false |
| 294 | + |
| 295 | + - id: delete_vm |
| 296 | + uses: ./.github/actions/delete-vm |
| 297 | + with: |
| 298 | + instance_name: ${{ needs.windows-test-vm.outputs.instance_name }} |
| 299 | + gcp_credentials: "${{ secrets.GCP_CREDENTIALS }}" |
| 300 | + github_runner_token: "${{ secrets.GH_RUNNER_TOKEN }}" |
| 301 | + |
155 | 302 | windows-build-opt: |
156 | 303 | runs-on: [ self-hosted, WinCross, X64 ] |
157 | 304 | needs: windows-build-vm |
@@ -185,6 +332,45 @@ jobs: |
185 | 332 | path: obj-*/dist/firefox-*.en-US.win64.zip |
186 | 333 | compression-level: 0 |
187 | 334 |
|
| 335 | + windows-test: |
| 336 | + runs-on: [self-hosted, WinNative, X64] |
| 337 | + needs: [ windows-test-vm, package-tests ] |
| 338 | + |
| 339 | + steps: |
| 340 | + - name: "download firefox build" |
| 341 | + uses: actions/download-artifact@v5 |
| 342 | + with: |
| 343 | + name: firefox-windows-amd64 |
| 344 | + |
| 345 | + - name: "download enterprise tests" |
| 346 | + uses: actions/download-artifact@v5 |
| 347 | + with: |
| 348 | + name: enterprise-tests |
| 349 | + |
| 350 | + - name: "unpack firefox build" |
| 351 | + id: unpack |
| 352 | + run: | |
| 353 | + C:\mozilla-build\bin\unzip.exe ./obj-*/dist/firefox-*.win64.zip |
| 354 | +
|
| 355 | + - name: "install python" |
| 356 | + run: | |
| 357 | + python3 -m venv venv_tests |
| 358 | +
|
| 359 | + - name: "install deps" |
| 360 | + run: | |
| 361 | + Invoke-WebRequest -Uri https://github.com/mozilla/geckodriver/releases/download/v0.36.0/geckodriver-v0.36.0-win32.zip -OutFile geckodriver-v0.36.0-win32.zip |
| 362 | + C:\mozilla-build\bin\unzip.exe geckodriver-v0.36.0-win32.zip |
| 363 | + . venv_tests\Scripts\activate |
| 364 | + pip3 install -r requirements.txt |
| 365 | +
|
| 366 | + - name: "run tests" |
| 367 | + run: | |
| 368 | + RUNTIME_VERSION=$(./obj-*/dist/firefox --version | awk '{ print $3 }') |
| 369 | + sed -e "s/#RUNTIME_VERSION#/${RUNTIME_VERSION}/g" < expectations.json.in > expectations.json |
| 370 | + mkdir -p ./profiles/ |
| 371 | + . venv_tests\Scripts\activate |
| 372 | + python3 test_firefox_start.py expectations.json ./obj-*/dist/firefox $PWD/geckodriver $PWD/profiles/ |
| 373 | +
|
188 | 374 | macOS-build-vm: |
189 | 375 | runs-on: ubuntu-24.04 |
190 | 376 | environment: Credentials |
@@ -269,3 +455,50 @@ jobs: |
269 | 455 | name: firefox-macOS-aarch64 |
270 | 456 | path: obj-*/dist/firefox-*.dmg* |
271 | 457 | compression-level: 0 |
| 458 | + |
| 459 | + macOS-test: |
| 460 | + runs-on: [self-hosted, MacNative, ARM64] |
| 461 | + needs: [ macOS-build-opt, package-tests ] |
| 462 | + |
| 463 | + steps: |
| 464 | + - name: "download firefox build" |
| 465 | + uses: actions/download-artifact@v5 |
| 466 | + with: |
| 467 | + name: firefox-macOS-aarch64 |
| 468 | + |
| 469 | + - name: "download enterprise tests" |
| 470 | + uses: actions/download-artifact@v5 |
| 471 | + with: |
| 472 | + name: enterprise-tests |
| 473 | + |
| 474 | + - name: "attach" |
| 475 | + id: attach |
| 476 | + run: | |
| 477 | + MOUNT_DIR=$(hdiutil attach ./obj-aarch64-apple-darwin/dist/firefox-144.0a1.en-US.mac.dmg | grep "/Volumes" | sed -e "s/.*\/Volumes/\/Volumes/g") |
| 478 | + ls -hal "${MOUNT_DIR}"/Firefox.app/Contents/MacOS/firefox |
| 479 | + echo "mount_dir='${MOUNT_DIR}'" >> "$GITHUB_OUTPUT" |
| 480 | + RUNTIME_PATH=$(find "${MOUNT_DIR}" -type f -name "firefox") |
| 481 | + echo "runtime_path=$RUNTIME_PATH" >> "$GITHUB_OUTPUT" |
| 482 | +
|
| 483 | + - name: "install python" |
| 484 | + run: | |
| 485 | + python3 -m venv venv_tests |
| 486 | +
|
| 487 | + - name: "install deps" |
| 488 | + run: | |
| 489 | + curl -sSL https://github.com/mozilla/geckodriver/releases/download/v0.36.0/geckodriver-v0.36.0-macos-aarch64.tar.gz | tar -xf - |
| 490 | + . venv_tests/bin/activate |
| 491 | + pip3 install -r requirements.txt |
| 492 | +
|
| 493 | + - name: "run tests" |
| 494 | + run: | |
| 495 | + RUNTIME_VERSION=$(${{ steps.attach.outputs.runtime_path }} --version | awk '{ print $3 }') |
| 496 | + sed -e "s/#RUNTIME_VERSION#/${RUNTIME_VERSION}/g" < expectations.json.in > expectations.json |
| 497 | + mkdir -p ./profiles/ |
| 498 | + . venv_tests/bin/activate |
| 499 | + python3 test_firefox_start.py expectations.json ${{ steps.attach.outputs.runtime_path }} $PWD/geckodriver $PWD/profiles/ |
| 500 | +
|
| 501 | + - name: "detach" |
| 502 | + if: "always()" |
| 503 | + run: | |
| 504 | + hdiutil unmount ${{ steps.attach.outputs.mount_dir }} |
0 commit comments