Skip to content

Commit 49a6a3c

Browse files
committed
renderdiff: enable update goldens on commit merge
1 parent 4f4d92d commit 49a6a3c

File tree

7 files changed

+316
-170
lines changed

7 files changed

+316
-170
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: 'Get commit message'
2+
runs:
3+
using: "composite"
4+
steps:
5+
- name: Find commit message (on push)
6+
if: github.event_name == 'push'
7+
run: |
8+
echo "commit_msg=${{ github.event.head_commit.message }}" >> $GITHUB_OUTPUT
9+
- name: Find commit message (on pull request)
10+
if: github.event_name == 'pull_request'
11+
run: |
12+
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
13+
echo "commit_msg=${COMMIT_MESSAGE}" >> $GITHUB_OUTPUT

.github/workflows/presubmit.yml

Lines changed: 171 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -9,111 +9,6 @@ on:
99
- main
1010

1111
jobs:
12-
build-desktop-mac:
13-
name: build-mac
14-
runs-on: macos-14-xlarge
15-
steps:
16-
- uses: actions/checkout@v4.1.6
17-
with:
18-
fetch-depth: 0
19-
- uses: ./.github/actions/mac-prereq
20-
- name: Run build script
21-
run: |
22-
cd build/mac && printf "y" | ./build.sh presubmit
23-
- name: Test material parser
24-
run: |
25-
out/cmake-release/filament/test/test_material_parser
26-
27-
build-desktop-linux:
28-
name: build-linux
29-
runs-on: ubuntu-22.04-16core
30-
steps:
31-
- uses: actions/checkout@v4.1.6
32-
with:
33-
fetch-depth: 0
34-
- uses: ./.github/actions/linux-prereq
35-
- name: Run build script
36-
run: |
37-
cd build/linux && printf "y" | ./build.sh presubmit
38-
- name: Test material parser
39-
run: |
40-
out/cmake-release/filament/test/test_material_parser
41-
42-
build-windows:
43-
name: build-windows
44-
runs-on: win-2019-16core
45-
46-
steps:
47-
- uses: actions/checkout@v4.1.6
48-
with:
49-
fetch-depth: 0
50-
- name: Run build script
51-
run: |
52-
build\windows\build-github.bat presubmit
53-
shell: cmd
54-
55-
build-android:
56-
name: build-android
57-
runs-on: 'ubuntu-24.04-16core'
58-
59-
steps:
60-
- uses: actions/checkout@v4.1.6
61-
with:
62-
fetch-depth: 0
63-
- uses: ./.github/actions/linux-prereq
64-
- uses: actions/setup-java@v3
65-
with:
66-
distribution: 'temurin'
67-
java-version: '17'
68-
- name: Run build script
69-
# Only build 1 64 bit target during presubmit to cut down build times during presubmit
70-
# Continuous builds will build everything
71-
run: |
72-
cd build/android && printf "y" | ./build.sh presubmit arm64-v8a
73-
74-
build-ios:
75-
name: build-iOS
76-
runs-on: macos-14-xlarge
77-
78-
steps:
79-
- uses: actions/checkout@v4.1.6
80-
with:
81-
fetch-depth: 0
82-
- uses: ./.github/actions/mac-prereq
83-
- name: Run build script
84-
run: |
85-
cd build/ios && printf "y" | ./build.sh presubmit
86-
- name: Build iOS samples
87-
run: |
88-
cd build/ios && ./build-samples.sh presubmit
89-
90-
build-web:
91-
name: build-web
92-
runs-on: 'ubuntu-24.04-16core'
93-
94-
steps:
95-
- uses: actions/checkout@v4.1.6
96-
with:
97-
fetch-depth: 0
98-
- uses: ./.github/actions/linux-prereq
99-
- uses: ./.github/actions/web-prereq
100-
- name: Run build script
101-
run: |
102-
cd build/web && printf "y" | ./build.sh presubmit
103-
104-
validate-docs:
105-
name: validate-docs
106-
runs-on: 'ubuntu-24.04-4core'
107-
steps:
108-
- uses: actions/checkout@v4.1.6
109-
with:
110-
fetch-depth: 0
111-
- name: Check for manual edits to /docs
112-
run: |
113-
echo "${{ github.event.pull_request.head.sha }} -- ${{ github.event.pull_request.head.sha }}"
114-
# disable for now
115-
# bash docs_src/build/presubmit_check.sh ${{ github.event.pull_request.head.sha }}
116-
11712
test-renderdiff:
11813
name: test-renderdiff
11914
runs-on: macos-14-xlarge
@@ -123,53 +18,188 @@ jobs:
12318
fetch-depth: 0
12419
- uses: ./.github/actions/mac-prereq
12520
- name: Cache Mesa and deps
126-
id: mesa-cache
12721
uses: actions/cache@v4
12822
with:
12923
path: mesa
13024
key: ${{ runner.os }}-mesa-deps-2-${{ vars.MESA_VERSION }}
13125
- name: Prerequisites
132-
id: prereqs
13326
run: |
13427
bash build/common/get-mesa.sh
13528
pip install tifffile numpy
29+
- id: get_commit_msg
30+
uses: ./.github/actions/get-commit-msg
13631
- name: Run Test
137-
run: bash test/renderdiff/test.sh
32+
run: |
33+
echo ${{ steps.get_commit_msg.outputs.commit_msg }}"
34+
echo ${{ steps.get_commit_msg.outputs.commit_msg }}" | bash test/renderdiff/test.sh
13835
- uses: actions/upload-artifact@v4
13936
with:
14037
name: presubmit-renderdiff-result
14138
path: ./out/renderdiff_tests
14239

143-
validate-wgsl-webgpu:
144-
name: validate-wgsl-webgpu
145-
runs-on: 'ubuntu-24.04-8core'
146-
steps:
147-
- uses: actions/checkout@v4.1.6
148-
with:
149-
fetch-depth: 0
150-
- uses: ./.github/actions/linux-prereq
151-
- name: Run build script
152-
run: ./build.sh -W debug test_filamat filament
153-
- name: Run test
154-
run: ./out/cmake-debug/libs/filamat/test_filamat --gtest_filter=MaterialCompiler.Wgsl*
155-
156-
test-code-correctness:
157-
name: test-code-correctness
158-
runs-on: 'macos-14-xlarge'
159-
steps:
160-
- uses: actions/checkout@v4.1.6
161-
with:
162-
fetch-depth: 0
163-
- uses: ./.github/actions/mac-prereq
164-
- name: Install clang-tidy and deps
165-
run: |
166-
pip install pyyaml
167-
brew install llvm@${GITHUB_LLVM_VERSION}
168-
sudo ln -s "$(brew --prefix llvm)@${GITHUB_LLVM_VERSION}/bin/clang-tidy" "/usr/local/bin/clang-tidy"
169-
- name: Run build script
170-
# We need to build before clang-tidy can run analysis
171-
run: |
172-
# This will build for all three desktop backends on mac
173-
./build.sh -p desktop debug gltf_viewer
174-
- name: Run test
175-
run: bash test/code-correctness/test.sh
40+
# build-desktop-mac:
41+
# name: build-mac
42+
# runs-on: macos-14-xlarge
43+
# steps:
44+
# - uses: actions/checkout@v4.1.6
45+
# with:
46+
# fetch-depth: 0
47+
# - uses: ./.github/actions/mac-prereq
48+
# - name: Run build script
49+
# run: |
50+
# cd build/mac && printf "y" | ./build.sh presubmit
51+
# - name: Test material parser
52+
# run: |
53+
# out/cmake-release/filament/test/test_material_parser
54+
55+
# build-desktop-linux:
56+
# name: build-linux
57+
# runs-on: ubuntu-22.04-16core
58+
# steps:
59+
# - uses: actions/checkout@v4.1.6
60+
# with:
61+
# fetch-depth: 0
62+
# - uses: ./.github/actions/linux-prereq
63+
# - name: Run build script
64+
# run: |
65+
# cd build/linux && printf "y" | ./build.sh presubmit
66+
# - name: Test material parser
67+
# run: |
68+
# out/cmake-release/filament/test/test_material_parser
69+
70+
# build-windows:
71+
# name: build-windows
72+
# runs-on: win-2019-16core
73+
74+
# steps:
75+
# - uses: actions/checkout@v4.1.6
76+
# with:
77+
# fetch-depth: 0
78+
# - name: Run build script
79+
# run: |
80+
# build\windows\build-github.bat presubmit
81+
# shell: cmd
82+
83+
# build-android:
84+
# name: build-android
85+
# runs-on: 'ubuntu-24.04-16core'
86+
87+
# steps:
88+
# - uses: actions/checkout@v4.1.6
89+
# with:
90+
# fetch-depth: 0
91+
# - uses: ./.github/actions/linux-prereq
92+
# - uses: actions/setup-java@v3
93+
# with:
94+
# distribution: 'temurin'
95+
# java-version: '17'
96+
# - name: Run build script
97+
# # Only build 1 64 bit target during presubmit to cut down build times during presubmit
98+
# # Continuous builds will build everything
99+
# run: |
100+
# cd build/android && printf "y" | ./build.sh presubmit arm64-v8a
101+
102+
# build-ios:
103+
# name: build-iOS
104+
# runs-on: macos-14-xlarge
105+
106+
# steps:
107+
# - uses: actions/checkout@v4.1.6
108+
# with:
109+
# fetch-depth: 0
110+
# - uses: ./.github/actions/mac-prereq
111+
# - name: Run build script
112+
# run: |
113+
# cd build/ios && printf "y" | ./build.sh presubmit
114+
# - name: Build iOS samples
115+
# run: |
116+
# cd build/ios && ./build-samples.sh presubmit
117+
118+
# build-web:
119+
# name: build-web
120+
# runs-on: 'ubuntu-24.04-16core'
121+
122+
# steps:
123+
# - uses: actions/checkout@v4.1.6
124+
# with:
125+
# fetch-depth: 0
126+
# - uses: ./.github/actions/linux-prereq
127+
# - uses: ./.github/actions/web-prereq
128+
# - name: Run build script
129+
# run: |
130+
# cd build/web && printf "y" | ./build.sh presubmit
131+
132+
# validate-docs:
133+
# name: validate-docs
134+
# runs-on: 'ubuntu-24.04-4core'
135+
# steps:
136+
# - uses: actions/checkout@v4.1.6
137+
# with:
138+
# fetch-depth: 0
139+
# - name: Check for manual edits to /docs
140+
# run: |
141+
# echo "${{ github.event.pull_request.head.sha }} -- ${{ github.event.pull_request.head.sha }}"
142+
# # disable for now
143+
# # bash docs_src/build/presubmit_check.sh ${{ github.event.pull_request.head.sha }}
144+
145+
# test-renderdiff:
146+
# name: test-renderdiff
147+
# runs-on: macos-14-xlarge
148+
# steps:
149+
# - uses: actions/checkout@v4.1.6
150+
# with:
151+
# fetch-depth: 0
152+
# - uses: ./.github/actions/mac-prereq
153+
# - name: Cache Mesa and deps
154+
# uses: actions/cache@v4
155+
# with:
156+
# path: mesa
157+
# key: ${{ runner.os }}-mesa-deps-2-${{ vars.MESA_VERSION }}
158+
# - name: Prerequisites
159+
# run: |
160+
# bash build/common/get-mesa.sh
161+
# pip install tifffile numpy
162+
# - id: get_commit_msg
163+
# uses: ./.github/actions/get-commit-msg
164+
# - name: Run Test
165+
# run: |
166+
# echo ${{ steps.get_commit_msg.outputs.commit_msg }}"
167+
# echo ${{ steps.get_commit_msg.outputs.commit_msg }}" | bash test/renderdiff/test.sh
168+
# - uses: actions/upload-artifact@v4
169+
# with:
170+
# name: presubmit-renderdiff-result
171+
# path: ./out/renderdiff_tests
172+
173+
# validate-wgsl-webgpu:
174+
# name: validate-wgsl-webgpu
175+
# runs-on: 'ubuntu-24.04-8core'
176+
# steps:
177+
# - uses: actions/checkout@v4.1.6
178+
# with:
179+
# fetch-depth: 0
180+
# - uses: ./.github/actions/linux-prereq
181+
# - name: Run build script
182+
# run: ./build.sh -W debug test_filamat filament
183+
# - name: Run test
184+
# run: ./out/cmake-debug/libs/filamat/test_filamat --gtest_filter=MaterialCompiler.Wgsl*
185+
186+
# test-code-correctness:
187+
# name: test-code-correctness
188+
# runs-on: 'macos-14-xlarge'
189+
# steps:
190+
# - uses: actions/checkout@v4.1.6
191+
# with:
192+
# fetch-depth: 0
193+
# - uses: ./.github/actions/mac-prereq
194+
# - name: Install clang-tidy and deps
195+
# run: |
196+
# pip install pyyaml
197+
# brew install llvm@${GITHUB_LLVM_VERSION}
198+
# sudo ln -s "$(brew --prefix llvm)@${GITHUB_LLVM_VERSION}/bin/clang-tidy" "/usr/local/bin/clang-tidy"
199+
# - name: Run build script
200+
# # We need to build before clang-tidy can run analysis
201+
# run: |
202+
# # This will build for all three desktop backends on mac
203+
# ./build.sh -p desktop debug gltf_viewer
204+
# - name: Run test
205+
# run: bash test/code-correctness/test.sh

0 commit comments

Comments
 (0)