@@ -159,31 +159,15 @@ jobs:
159159 - name : Dawn Dependency
160160 id : dawn-depends
161161 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
162+ DAWN_VERSION="v1.0.0"
163+ DAWN_OWNER="reeselevine"
164+ DAWN_REPO="dawn"
165+ DAWN_ASSET_NAME="Dawn-a1a6b45cced25a3b7f4fb491e0ae70796cc7f22b-macos-latest-Release.tar.gz"
166+ echo "Fetching release asset from https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}"
167+ curl -L -o artifact.tar.gz \
168+ "https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}"
183169 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
170+ tar -xvf artifact.tar.gz -C dawn --strip-components=1
187171
188172 - name : Build
189173 id : cmake_build
@@ -433,31 +417,15 @@ jobs:
433417 id : dawn-depends
434418 run : |
435419 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
420+ DAWN_VERSION="v1.0.0"
421+ DAWN_OWNER="reeselevine"
422+ DAWN_REPO="dawn"
423+ DAWN_ASSET_NAME="Dawn-a1a6b45cced25a3b7f4fb491e0ae70796cc7f22b-ubuntu-latest-Release.tar.gz"
424+ echo "Fetching release asset from https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}"
425+ curl -L -o artifact.tar.gz \
426+ "https://github.com/${DAWN_OWNER}/${DAWN_REPO}/releases/download/${DAWN_VERSION}/${DAWN_ASSET_NAME}"
457427 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
428+ tar -xvf artifact.tar.gz -C dawn --strip-components=1
461429
462430 - name : Build
463431 id : cmake_build
0 commit comments