Files
judge/.gitea/workflows/build-dsl-smoke.yml
Mikhail Kornilovich 7ec3a43c7a
All checks were successful
build-dsl-smoke / Build judge (push) Successful in 12s
build-dsl-smoke / debug / clang / linux (push) Successful in 6s
build-dsl-smoke / debug / gcc / linux (push) Successful in 8s
build-dsl-smoke / release / clang / linux (push) Successful in 8s
build-dsl-smoke / release / gcc / linux (push) Successful in 6s
build-dsl-smoke / sanitized / clang / linux (push) Successful in 8s
build-dsl-smoke / sanitized / gcc / linux (push) Successful in 7s
build-dsl-smoke / debug / clang / windows (push) Successful in 13s
build-dsl-smoke / debug-valgrind / gcc / linux (push) Successful in 14s
build-dsl-smoke / release / clang / windows (push) Successful in 16s
build-dsl-smoke / debug / msvc / windows (push) Successful in 18s
build-dsl-smoke / release / msvc / windows (push) Successful in 17s
build-dsl-smoke / SUMMARY (push) Successful in 4s
Release / Build & publish (push) Successful in 48s
1. New build system
Reviewed-on: #1
2026-04-12 07:59:38 +00:00

153 lines
4.6 KiB
YAML

name: build-dsl-smoke
run-name: "Structured build DSL smoke test"
on:
push:
paths:
- 'dsl/**'
- 'runner/**'
- 'reporter/**'
- 'cmd/cli/**'
- 'example/c-sum-v2/**'
- '.gitea/workflows/build-dsl-smoke.yml'
workflow_dispatch:
env:
SUITE_FILE: sum.jdg
EXAMPLE_DIR: example/c-sum-v2
jobs:
build_judge:
name: Build judge
runs-on: Linux-Runner
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Cross-compile judge
shell: bash
run: |
mkdir -p dist
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o dist/judge-linux-amd64 ./cmd/cli
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o dist/judge-windows-amd64.exe ./cmd/cli
ls -la dist/
- name: Upload judge binaries
uses: https://github.com/christopherHX/gitea-upload-artifact@v4
with:
name: judge-bin-csum2
path: dist/
retention-days: 1
test:
needs: build_judge
name: "${{ matrix.build }} / ${{ matrix.toolchain }} / ${{ matrix.platform }}"
strategy:
fail-fast: false
matrix:
include:
- { build: release, toolchain: gcc, platform: linux }
- { build: release, toolchain: clang, platform: linux }
- { build: release, toolchain: clang, platform: windows }
- { build: release, toolchain: msvc, platform: windows }
- { build: debug, toolchain: gcc, platform: linux }
- { build: debug, toolchain: clang, platform: linux }
- { build: debug, toolchain: clang, platform: windows }
- { build: debug, toolchain: msvc, platform: windows }
- { build: sanitized, toolchain: gcc, platform: linux }
- { build: sanitized, toolchain: clang, platform: linux }
- { build: debug-valgrind, toolchain: gcc, platform: linux }
runs-on: ${{ matrix.platform == 'windows' && 'Windows-Runner' || 'Linux-Runner' }}
timeout-minutes: 10
env:
REPORT_NAME: "report_${{ matrix.build }}_${{ matrix.toolchain }}_${{ matrix.platform }}"
JUDGE_TOOLCHAIN: ${{ matrix.toolchain }}
steps:
- uses: actions/checkout@v4
- name: Set up MSVC environment
if: matrix.toolchain == 'msvc'
uses: ilammy/msvc-dev-cmd@v1
- name: Download judge binary
uses: https://github.com/christopherHX/gitea-download-artifact@v4
with:
name: judge-bin-csum2
path: judge-bin
- name: Install judge on PATH
shell: bash
run: |
mkdir -p bin
if [ "${{ matrix.platform }}" = "windows" ]; then
cp judge-bin/judge-windows-amd64.exe bin/judge.exe
else
cp judge-bin/judge-linux-amd64 bin/judge
chmod +x bin/judge
fi
echo "$PWD/bin" >> "$GITHUB_PATH"
- name: Run judge
shell: bash
working-directory: ${{ env.EXAMPLE_DIR }}
run: |
judge "$SUITE_FILE" . --build=${{ matrix.build }} --json > "$GITHUB_WORKSPACE/${REPORT_NAME}.json" || true
cat "$GITHUB_WORKSPACE/${REPORT_NAME}.json"
judge "$SUITE_FILE" . --build=${{ matrix.build }}
- name: Upload report
if: ${{ always() }}
uses: https://github.com/christopherHX/gitea-upload-artifact@v4
with:
name: ${{ env.REPORT_NAME }}
path: ${{ env.REPORT_NAME }}.json
retention-days: 7
compression-level: 9
summary:
needs: [build_judge, test]
if: ${{ always() }}
name: SUMMARY
runs-on: Linux-Runner
timeout-minutes: 5
steps:
- name: Download judge binary
uses: https://github.com/christopherHX/gitea-download-artifact@v4
with:
name: judge-bin-csum2
path: judge-bin
- name: Install judge on PATH
shell: bash
run: |
mkdir -p bin
cp judge-bin/judge-linux-amd64 bin/judge
chmod +x bin/judge
echo "$PWD/bin" >> "$GITHUB_PATH"
- name: Download all reports
uses: https://github.com/christopherHX/gitea-download-artifact@v4
with:
path: reports
pattern: report_*
- name: Aggregate
shell: bash
run: judge aggregate reports | tee SUMMARY.md
- name: Upload summary
uses: https://github.com/christopherHX/gitea-upload-artifact@v4
with:
name: SUMMARY
path: SUMMARY.md
retention-days: 7