Merge pull request #78 from DigiEmu/core-2-draft4-self-audit #168
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Demo Verify Gate (Windows) | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: demo-verify-gate-windows-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| demo_verify_gate_windows: | |
| name: demo verify gate (windows-latest) | |
| runs-on: windows-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Run unit tests | |
| shell: pwsh | |
| run: go test ./... | |
| - name: Build digiemu (CI) | |
| shell: pwsh | |
| run: | | |
| New-Item -ItemType Directory -Force -Path _release | Out-Null | |
| $version = "ci-${{ github.sha }}" | |
| $commit = "${{ github.sha }}" | |
| $date = (Get-Date).ToString("yyyy-MM-ddTHH:mm:ssK") | |
| $env:CGO_ENABLED = "0" | |
| go build -trimpath -ldflags "-s -w -X main.Version=$version -X main.Commit=$commit -X main.Date=$date" -o _release/digiemu-ci-windows-amd64.exe ./cmd/digiemu | |
| - name: Run all gates (verify + bundles + lock) | |
| shell: pwsh | |
| run: | | |
| pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/gate_all.ps1 -ExePath _release\digiemu-ci-windows-amd64.exe | |
| - name: Run demo bundles gate (OK + FAIL) | |
| shell: pwsh | |
| run: | | |
| powershell -NoProfile -ExecutionPolicy Bypass -File scripts/gate_demo_bundles.ps1 -ExePath _release\digiemu-ci-windows-amd64.exe | |
| - name: Upload demo _out artifacts (on failure) | |
| if: failure() | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: demo-verify-out-windows | |
| path: examples/snapshot_v1_demo/_out/** |