-
Notifications
You must be signed in to change notification settings - Fork 51
54 lines (51 loc) · 1.62 KB
/
test.yaml
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
name: "Test source code"
on:
workflow_dispatch:
push:
pull_request:
jobs:
CheckAutoGeneratedCode:
name: 'Check if aut-generated code is up-to-date'
runs-on: ubuntu-latest
steps:
- name: install luajit
run: |
sudo apt-get install -y luajit
- name: Checkout out source code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- name: Re-generate code with Make
run: |
make generate
- name: Check if code was up-to-date
run: |
echo -e "If you see this failing, it means that your have made changes in generator's code
and the wrapper needs to be re-generated OR you've edited some of the generated
files directly. To fix it, run \`make cimgui\` and/or \`make cimplot\`"
git diff --exit-code
RunGoTests:
name: 'Run go unittests (${{ matrix.os }})'
needs: CheckAutoGeneratedCode
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Set up LibGL, Mesa & X11 libraries
if: startsWith(matrix.os,'ubuntu')
run: |
sudo apt-get --allow-releaseinfo-change update
sudo apt-get install -y libgtk-3-dev libasound2-dev libxxf86vm-dev
- name: Set up Go environment
uses: actions/setup-go@v5
with:
go-version: '1.23.x'
- name: Checkout out source code
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'recursive'
- name: Run Go test
run: go test -race -v ./...