From 2e9605e79c64315ecad7ae8297d996ae2ed4687b Mon Sep 17 00:00:00 2001 From: Anders Leino Date: Thu, 19 Dec 2024 21:11:13 +0200 Subject: Enable more examples in CI (#5915) * CI: examples: Add support for filtering on platform * Add platform field to example run IDs - Remove the reflection-api entry for Windows. - Add 'aarch64' as platform for all 'macos' entries. - Add 'x86_64' as platform for all other entries. - This will implicitly enable all aarch64 tests for Linux. This helps to address issue #5520. --- .github/workflows/ci-examples.sh | 25 +++++++++++++++++++++---- .github/workflows/ci.yml | 1 + 2 files changed, 22 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/workflows/ci-examples.sh b/.github/workflows/ci-examples.sh index 4164b0ece..7372d70a7 100755 --- a/.github/workflows/ci-examples.sh +++ b/.github/workflows/ci-examples.sh @@ -20,16 +20,19 @@ Options: --config Build configuration. Valid values: 'debug', 'release'. + --platform Target platform. + Valid values: 'x86_64', 'aarch64'. + Skip file: The skip patterns are regexp patterns on the following format: - :: # Some comment describing why test is disabled + ::: # Some comment describing why test is disabled For example: # Bug 123: foo-example fails (both debug and release) - windows:(debug|release):foo-example + windows:x86_64(debug|release):foo-example # Bug 456: bar-example fails in release mode on Linux - linux:release:bar-example + linux:aarch64:release:bar-example EOF } @@ -78,6 +81,16 @@ while [[ "$#" -gt 0 ]]; do config="$2" shift ;; + --platform) + case $2 in + x86_64 | aarch64) ;; + *) + user_error "Unrecognized platform: '$2'" + ;; + esac + platform="$2" + shift + ;; *) user_error "Unrecognized argument: '$1'" ;; @@ -101,6 +114,10 @@ if [[ "$skip_file" == "" ]]; then user_error "No skip file specified." fi +if [[ "$platform" == "" ]]; then + user_error "No platform specified." +fi + if [[ ! -f "$skip_file" ]]; then user_error "Skip file '$skip_file' does not exist." fi @@ -142,7 +159,7 @@ function run_sample { args=("$@") sample_count=$((sample_count + 1)) summary=("${summary[@]}" "$sample: ") - if skip "$os:$config:$sample"; then + if skip "$os:$platform:$config:$sample"; then echo "Skipping $sample..." summary=("${summary[@]}" " skipped") skip_count=$((skip_count + 1)) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6289d291f..e31b3b34d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -182,6 +182,7 @@ jobs: .github/workflows/ci-examples.sh \ --bin-dir "$bin_dir" \ --os "${{matrix.os}}" \ + --platform "${{matrix.platform}}" \ --config "${{matrix.config}}" \ --skip-file tests/expected-example-failure-github.txt - name: Test Slang via glsl -- cgit v1.2.3