aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/ci.yml
blob: bc2c6fe27345e29cedcb2f2f66db968733462746 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: ci

on:
  push:
  pull_request:

concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Install system libraries
        run: |
          sudo apt-get update
          sudo apt-get install -y mold libgl1-mesa-dev libx11-dev libxrandr-dev libxinerama-dev \
            libxcursor-dev libxi-dev libcurl4-openssl-dev

      - uses: laytan/setup-odin@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          release: dev-2026-11a

      - name: Checks
        run: ./check.sh

      - name: No open questions in the code
        run: |
          if git grep -n 'BLOCKED: #' -- '*.odin'; then
            echo "open questions (BLOCKED markers) above, answer them before merging"
            exit 1
          fi

      - name: Build debug
        run: ./compile.sh debug

      - name: Build release
        run: ./compile.sh release

      - name: Bake reproduces belgium.bin
        run: |
          odin run tools/bake_map -vet -strict-style -out:build/bake_map
          git diff --exit-code assets/belgium.bin

      - name: Tests
        run: |
          if ls test/*.odin >/dev/null 2>&1; then
            odin run test -out:build/test
          fi

  build-windows:
    runs-on: windows-2022
    steps:
      - uses: actions/checkout@v4

      - uses: laytan/setup-odin@v2
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          release: dev-2026-11a

      - name: Build debug
        shell: cmd
        run: compile.bat debug

      - name: Build release
        shell: cmd
        run: compile.bat release