v2 / .github / workflows / docker_ci.yml
100 lines · 94 sloc · 2.72 KB · 8018dde3ea6cb7bf0b3a3c3f08cd893511e92ca2
Raw
1name: Docker CI
2
3on:
4 push:
5 paths-ignore:
6 - '**.md'
7 - '**.yml'
8 - '!**/docker_ci.yml'
9 - 'cmd/tools/**'
10 - '!cmd/tools/builders/**.v'
11 pull_request:
12 paths-ignore:
13 - '**.md'
14 - '**.yml'
15 - '!**/docker_ci.yml'
16 - 'cmd/tools/**'
17 - '!cmd/tools/builders/**.v'
18
19concurrency:
20 group: docker-${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.sha || github.ref }}
21 cancel-in-progress: true
22
23env:
24 V_CI_MUSL: 1
25
26jobs:
27 docker-alpine-musl-gcc:
28 runs-on: ubuntu-24.04
29 timeout-minutes: 241
30 container:
31 image: thevlang/vlang:alpine-build
32 env:
33 VFLAGS: -cc gcc
34 volumes:
35 - ${{github.workspace}}:/opt/vlang
36 steps:
37 - name: Checkout
38 uses: actions/checkout@v6
39 - name: Show Environment
40 run: |
41 echo "PWD:"
42 pwd
43 echo "ENVIRONMENT:"
44 env
45 echo "C Compiler:"
46 gcc --version
47 - name: Add dependencies
48 run: apk add libc6-compat gcompat gc gc-dev binutils diffutils elfutils
49 - name: Build V
50 run: CC=gcc make
51 - name: All code is formatted
52 run: ./v -silent test-cleancode
53 - name: Run only essential tests
54 run: VTEST_JUST_ESSENTIAL=1 ./v -silent test-self
55
56 docker-alpine-musl-tcc:
57 runs-on: ubuntu-24.04
58 timeout-minutes: 241
59 container:
60 image: thevlang/vlang:alpine-build
61 volumes:
62 - ${{github.workspace}}:/opt/vlang
63 steps:
64 - name: Checkout
65 uses: actions/checkout@v6
66 - name: Add dependencies
67 run: apk add musl-dev libatomic_ops-dev libatomic openssl libc6-compat gcompat gc gc-dev binutils diffutils elfutils
68 - name: Build V
69 run: make
70 - name: Check if vpm compiles with tcc
71 run: ./v -show-c-output -showcc -no-retry-compilation -cc tcc cmd/tools/vpm
72 - name: Run only builtin and math tests
73 run: ./v test vlib/builtin
74
75 docker-ubuntu-musl:
76 runs-on: ubuntu-24.04
77 timeout-minutes: 121
78 container:
79 image: thevlang/vlang:ubuntu-build
80 env:
81 V_CI_UBUNTU_MUSL: 1
82 VFLAGS: -cc musl-gcc -gc none
83 volumes:
84 - ${{github.workspace}}:/opt/vlang
85 steps:
86 - name: Checkout
87 uses: actions/checkout@v6
88 - name: Build V
89 run: echo "$VFLAGS" && make -j4 && ./v -cg -o v cmd/v
90 - name: Verify `v test` works
91 run: |
92 echo "$VFLAGS"
93 ./v cmd/tools/test_if_v_test_system_works.v
94 ./cmd/tools/test_if_v_test_system_works
95 - name: Add dependencies
96 run: apt install libsqlite3-dev
97 - name: All code is formatted
98 run: ./v -silent test-cleancode
99 - name: Test V fixed tests
100 run: ./v -silent test-self vlib
101