v / .github / workflows
Raw file | 88 loc (73 sloc) | 2.22 KB | Latest commit hash a1e87664f
1name: Containers 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: build-containers-${{ github.event.pull_request.number || github.sha }}
15 cancel-in-progress: true
16
17jobs:
18
19 alpine-docker-musl-gcc:
20 runs-on: ubuntu-20.04
21 if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
22 timeout-minutes: 181
23 container:
24 # Alpine docker pre-built container
25 image: thevlang/vlang:alpine-build
26 env:
27 V_CI_MUSL: 1
28 VFLAGS: -cc gcc
29 volumes:
30 - ${{github.workspace}}:/opt/vlang
31
32 steps:
33 - name: Checkout
34 uses: actions/checkout@v3
35
36 - name: Show Environment
37 run: |
38 echo "PWD:"
39 pwd
40 echo "ENVIRONMENT:"
41 env
42 echo "C Compiler:"
43 gcc --version
44
45 - name: Add dependencies
46 run: |
47 apk add libc6-compat
48
49 - name: Build V
50 run: CC=gcc make
51
52 - name: All code is formatted
53 run: ./v test-cleancode
54
55 - name: Run only essential tests
56 run: VTEST_JUST_ESSENTIAL=1 ./v test-self
57
58 ubuntu-docker-musl:
59 runs-on: ubuntu-20.04
60 if: github.event_name != 'push' || github.event.ref == 'refs/heads/master' || github.event.repository.full_name != 'vlang/v'
61 timeout-minutes: 121
62 container:
63 image: thevlang/vlang:ubuntu-build
64 env:
65 V_CI_MUSL: 1
66 V_CI_UBUNTU_MUSL: 1
67 VFLAGS: -cc musl-gcc -gc none
68 volumes:
69 - ${{github.workspace}}:/opt/vlang
70
71 steps:
72 - name: Checkout
73 uses: actions/checkout@v3
74
75 - name: Build V
76 run: |
77 echo $VFLAGS && make -j4 && ./v -cg -o v cmd/v
78 - name: Verify `v test` works
79 run: |
80 echo $VFLAGS
81 ./v cmd/tools/test_if_v_test_system_works.v
82 ./cmd/tools/test_if_v_test_system_works
83
84 - name: All code is formatted
85 run: ./v test-cleancode
86
87 - name: Test V fixed tests
88 run: ./v test-self