v / .github / workflows
Raw file | 51 loc (43 sloc) | 1.27 KB | Latest commit hash a1e87664f
1name: sdl CI
2
3on:
4 push:
5 paths-ignore:
6 - "**.md"
7 - "**.yml"
8 pull_request:
9 paths-ignore:
10 - "**.md"
11 - "**.yml"
12
13concurrency:
14 group: sdl-ci-${{ github.event.pull_request.number || github.sha }}
15 cancel-in-progress: true
16
17jobs:
18 v-compiles-sdl-examples:
19 runs-on: ubuntu-20.04
20 if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
21 timeout-minutes: 30
22 env:
23 VFLAGS: -cc tcc
24 steps:
25 - uses: actions/checkout@v3
26 - name: Build V
27 run: make && sudo ./v symlink
28
29 - name: Clone sdl into .vmodules
30 run: |
31 git clone --depth 1 https://github.com/vlang/sdl
32 cd sdl
33 mkdir -p ~/.vmodules
34 ln -s $(pwd) ~/.vmodules/sdl
35
36 - name: Install dependencies
37 run: |
38 sudo apt-get update
39 sudo apt-get install --quiet -y libsdl2-dev libsdl2-ttf-dev
40 sudo apt-get install --quiet -y libsdl2-mixer-dev libsdl2-image-dev
41
42 - name: Run tests
43 run: ./v test sdl
44
45 - name: Build sdl shared
46 run: ./v -shared -g sdl
47
48 - name: Build sdl examples
49 run: |
50 v shader sdl/examples/sdl_opengl_and_sokol
51 v should-compile-all sdl/examples/