Skip to content

Commit

Permalink
ci: split containers_ci.yml to docker_alpine.yml and docker_ubuntu.ym…
Browse files Browse the repository at this point in the history
…l, so that restarting the flakier alpine job will not have to stop/cancel the slower but more robust ubuntu musl job
  • Loading branch information
spytheman committed Nov 15, 2023
1 parent 1e3d382 commit 7c0aed1
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 88 deletions.
88 changes: 0 additions & 88 deletions .github/workflows/containers_ci.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/docker_alpine.yml
@@ -0,0 +1,57 @@
name: Docker Alpine MUSL CI

on:
push:
paths-ignore:
- "**.md"
- "**.yml"
pull_request:
paths-ignore:
- "**.md"
- "**.yml"

concurrency:
group: docker-alpine-musl-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
alpine-docker-musl-gcc:
runs-on: ubuntu-20.04
if: >
github.event_name != 'push'
|| github.event.ref == 'refs/heads/master'
|| github.event.repository.full_name != 'vlang/v'
timeout-minutes: 241
container:
image: thevlang/vlang:alpine-build
env:
V_CI_MUSL: 1
VFLAGS: -cc gcc
volumes:
- ${{github.workspace}}:/opt/vlang

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Show Environment
run: |
echo "PWD:"
pwd
echo "ENVIRONMENT:"
env
echo "C Compiler:"
gcc --version
- name: Add dependencies
run: |
apk add libc6-compat
- name: Build V
run: CC=gcc make

- name: All code is formatted
run: VJOBS=1 ./v test-cleancode

- name: Run only essential tests
run: VTEST_JUST_ESSENTIAL=1 ./v test-self
51 changes: 51 additions & 0 deletions .github/workflows/docker_ubuntu.yml
@@ -0,0 +1,51 @@
name: Docker Ubuntu MUSL CI

on:
push:
paths-ignore:
- "**.md"
- "**.yml"
pull_request:
paths-ignore:
- "**.md"
- "**.yml"

concurrency:
group: docker-ubuntu-musl-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

jobs:
ubuntu-docker-musl:
runs-on: ubuntu-20.04
if: >
github.event_name != 'push'
|| github.event.ref == 'refs/heads/master'
|| github.event.repository.full_name != 'vlang/v'
timeout-minutes: 121
container:
image: thevlang/vlang:ubuntu-build
env:
V_CI_MUSL: 1
V_CI_UBUNTU_MUSL: 1
VFLAGS: -cc musl-gcc -gc none
volumes:
- ${{github.workspace}}:/opt/vlang

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Build V
run: |
echo $VFLAGS && make -j4 && ./v -cg -o v cmd/v
- name: Verify `v test` works
run: |
echo $VFLAGS
./v cmd/tools/test_if_v_test_system_works.v
./cmd/tools/test_if_v_test_system_works
- name: All code is formatted
run: ./v test-cleancode

- name: Test V fixed tests
run: ./v test-self

0 comments on commit 7c0aed1

Please sign in to comment.