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