|
5 | 5 | push: |
6 | 6 | branches: |
7 | 7 | - master |
| 8 | + - workflow-updates |
8 | 9 | paths: [ |
9 | 10 | '.github/workflows/build.yml', |
10 | 11 | '.github/workflows/build-linux-cross.yml', |
@@ -159,31 +160,15 @@ jobs: |
159 | 160 | - name: Dawn Dependency |
160 | 161 | id: dawn-depends |
161 | 162 | run: | |
162 | | - ARTIFACTS_JSON=$(curl -s -L \ |
163 | | - -H "Accept: application/vnd.github+json" \ |
164 | | - -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ |
165 | | - -H "X-GitHub-Api-Version: 2022-11-28" \ |
166 | | - "https://api.github.com/repos/google/dawn/actions/artifacts") |
167 | | - echo "Finding latest macos-latest-Release artifact..." |
168 | | - DOWNLOAD_URL=$(echo "$ARTIFACTS_JSON" | jq -r '.artifacts |
169 | | - | sort_by(.created_at) |
170 | | - | reverse |
171 | | - | map(select(.name | test("macos-latest-Release$"))) |
172 | | - | .[0].archive_download_url') |
173 | | - if [ "$DOWNLOAD_URL" = "null" ] || [ -z "$DOWNLOAD_URL" ]; then |
174 | | - echo "No suitable Dawn artifact found!" |
175 | | - exit 1 |
176 | | - fi |
177 | | - echo "Downloading from: $DOWNLOAD_URL" |
178 | | - curl -L \ |
179 | | - -H "Accept: application/vnd.github+json" \ |
180 | | - -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ |
181 | | - -o artifact.zip "$DOWNLOAD_URL" |
182 | | - unzip artifact.zip |
| 163 | + DAWN_VERSION="v1.0.0" |
| 164 | + DAWN_OWNER="reeselevine" |
| 165 | + DAWN_REPO="dawn" |
| 166 | + DAWN_ASSET_NAME="Dawn-a1a6b45cced25a3b7f4fb491e0ae70796cc7f22b-macos-latest-Release.tar.gz" |
| 167 | + echo "Fetching release asset from https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}" |
| 168 | + curl -L -o artifact.tar.gz \ |
| 169 | + "https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}" |
183 | 170 | mkdir dawn |
184 | | - tar_file=$(find . -name '*.tar.gz' | head -n 1) |
185 | | - echo "Extracting: $tar_file" |
186 | | - tar -xvf "$tar_file" -C dawn --strip-components=1 |
| 171 | + tar -xvf artifact.tar.gz -C dawn --strip-components=1 |
187 | 172 |
|
188 | 173 | - name: Build |
189 | 174 | id: cmake_build |
@@ -433,31 +418,15 @@ jobs: |
433 | 418 | id: dawn-depends |
434 | 419 | run: | |
435 | 420 | sudo apt-get install -y libxrandr-dev libxinerama-dev libxcursor-dev mesa-common-dev libx11-xcb-dev libxi-dev |
436 | | - ARTIFACTS_JSON=$(curl -s -L \ |
437 | | - -H "Accept: application/vnd.github+json" \ |
438 | | - -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ |
439 | | - -H "X-GitHub-Api-Version: 2022-11-28" \ |
440 | | - "https://api.github.com/repos/google/dawn/actions/artifacts") |
441 | | - echo "Finding latest ubuntu-latest-Release artifact..." |
442 | | - DOWNLOAD_URL=$(echo "$ARTIFACTS_JSON" | jq -r '.artifacts |
443 | | - | sort_by(.created_at) |
444 | | - | reverse |
445 | | - | map(select(.name | test("ubuntu-latest-Release$"))) |
446 | | - | .[0].archive_download_url') |
447 | | - if [ "$DOWNLOAD_URL" = "null" ] || [ -z "$DOWNLOAD_URL" ]; then |
448 | | - echo "No suitable Dawn artifact found!" |
449 | | - exit 1 |
450 | | - fi |
451 | | - echo "Downloading from: $DOWNLOAD_URL" |
452 | | - curl -L \ |
453 | | - -H "Accept: application/vnd.github+json" \ |
454 | | - -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ |
455 | | - -o artifact.zip "$DOWNLOAD_URL" |
456 | | - unzip artifact.zip |
| 421 | + DAWN_VERSION="v1.0.0" |
| 422 | + DAWN_OWNER="reeselevine" |
| 423 | + DAWN_REPO="dawn" |
| 424 | + DAWN_ASSET_NAME="Dawn-a1a6b45cced25a3b7f4fb491e0ae70796cc7f22b-ubuntu-latest-Release.tar.gz" |
| 425 | + echo "Fetching release asset from https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}" |
| 426 | + curl -L -o artifact.tar.gz \ |
| 427 | + "https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}" |
457 | 428 | mkdir dawn |
458 | | - tar_file=$(find . -name '*.tar.gz' | head -n 1) |
459 | | - echo "Extracting: $tar_file" |
460 | | - tar -xvf "$tar_file" -C dawn --strip-components=1 |
| 429 | + tar -xvf artifact.tar.gz -C dawn --strip-components=1 |
461 | 430 |
|
462 | 431 | - name: Build |
463 | 432 | id: cmake_build |
|
0 commit comments