Skip to content

build-dawn

build-dawn #68

Workflow file for this run

name: build-dawn
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
jobs:
info:
runs-on: ubuntu-24.04
outputs:
DAWN_COMMIT: ${{ steps.info.outputs.DAWN_COMMIT }}
BUILD_DATE: ${{ steps.info.outputs.BUILD_DATE }}
steps:
- name: Get Latest Commit Id
id: info
run: |
echo DAWN_COMMIT=`git ls-remote https://dawn.googlesource.com/dawn HEAD | awk '{ print $1 }'` >> ${GITHUB_OUTPUT}
echo BUILD_DATE=`date +'%Y-%m-%d'` >> ${GITHUB_OUTPUT}
build-windows:
runs-on: windows-2022
needs: info
strategy:
matrix:
arch: [x64, arm64]
env:
DAWN_COMMIT: ${{ needs.info.outputs.DAWN_COMMIT }}
BUILD_DATE: ${{ needs.info.outputs.BUILD_DATE }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Windows SDK v10.0.26100.0
shell: cmd
run: |
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --quiet --force --norestart --add Microsoft.VisualStudio.Component.Windows11SDK.26100
- name: Run Build Script
id: build
shell: cmd
run: call build.cmd ${{ matrix.arch }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: dawn-win-${{ matrix.arch }}-${{ needs.info.outputs.BUILD_DATE }}
path: dawn-win-${{ matrix.arch }}-${{ needs.info.outputs.BUILD_DATE }}.zip
if-no-files-found: error
compression-level: 0
build-mac:
runs-on: macos-latest
needs: info
strategy:
matrix:
arch: [arm64]
env:
DAWN_COMMIT: ${{ needs.info.outputs.DAWN_COMMIT }}
BUILD_DATE: ${{ needs.info.outputs.BUILD_DATE }}
steps:
- name: Update XCode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@v4
- name: Run Build Script
id: build
shell: bash
run: bash build.sh mac ${{ matrix.arch }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: dawn-mac-${{ matrix.arch }}-${{ needs.info.outputs.BUILD_DATE }}
path: dawn-mac-${{ matrix.arch }}-${{ needs.info.outputs.BUILD_DATE }}.zip
if-no-files-found: error
compression-level: 0
release:
runs-on: ubuntu-24.04
needs: [info, build-windows, build-mac]
permissions:
contents: write
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Create GitHub Release
run: |
echo '[dawn commit](https://dawn.googlesource.com/dawn/+/${{ needs.info.outputs.DAWN_COMMIT }})' >>notes.txt
gh release create ${{ needs.info.outputs.BUILD_DATE }} -R "${GITHUB_REPOSITORY}" -t '${{ needs.info.outputs.BUILD_DATE }}' -F notes.txt
- name: Get Artifacts From Build Steps
uses: actions/download-artifact@v4
with:
pattern: dawn-*-*-${{ needs.info.outputs.BUILD_DATE }}
merge-multiple: true
- name: Upload Artifacts to GitHub Release
run: gh release upload '${{ needs.info.outputs.BUILD_DATE }}' dawn-*-*-${{ needs.info.outputs.BUILD_DATE }}.zip -R "${GITHUB_REPOSITORY}"