From a8862427008c8a8f7bbd7c7bf6e2a1d5366df99b Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Fri, 18 Feb 2022 10:31:01 +0200 Subject: [PATCH] ci: extract ubuntu-docker-musl and alpine-docker-musl-gcc to containers_ci.yml, so they can be easily turned on/off in private github actions --- .github/workflows/containers_ci.yml | 73 +++++++++++++++++++++++++++++ .github/workflows/other_ci.yml | 58 ----------------------- 2 files changed, 73 insertions(+), 58 deletions(-) create mode 100644 .github/workflows/containers_ci.yml diff --git a/.github/workflows/containers_ci.yml b/.github/workflows/containers_ci.yml new file mode 100644 index 0000000000..7837d9b9af --- /dev/null +++ b/.github/workflows/containers_ci.yml @@ -0,0 +1,73 @@ +name: Containers CI + +on: + push: + paths-ignore: + - "**.md" + pull_request: + paths-ignore: + - "**.md" + +concurrency: + group: build-other-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + +jobs: + + alpine-docker-musl-gcc: + runs-on: ubuntu-20.04 + timeout-minutes: 121 + container: + # Alpine docker pre-built 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@v2 + + - name: Show Environment + run: | + echo "PWD:" + pwd + echo "ENVIRONMENT:" + env + echo "C Compiler:" + gcc --version + + - name: Build V + run: CC=gcc make + + - name: Test V fixed tests + run: ./v test-self + + ubuntu-docker-musl: + runs-on: ubuntu-20.04 + timeout-minutes: 121 + container: + image: thevlang/vlang:ubuntu-build + env: + V_CI_MUSL: 1 + V_CI_UBUNTU_MUSL: 1 + VFLAGS: -cc musl-gcc + volumes: + - ${{github.workspace}}:/opt/vlang + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - 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: Test V fixed tests + run: ./v test-self diff --git a/.github/workflows/other_ci.yml b/.github/workflows/other_ci.yml index b711c0a840..0836b0727d 100644 --- a/.github/workflows/other_ci.yml +++ b/.github/workflows/other_ci.yml @@ -246,61 +246,3 @@ jobs: run: ./v install libsodium - name: Test libsodium run: ./v test ~/.vmodules/libsodium - - alpine-docker-musl-gcc: - runs-on: ubuntu-20.04 - timeout-minutes: 121 - container: - # Alpine docker pre-built 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@v2 - - - name: Show Environment - run: | - echo "PWD:" - pwd - echo "ENVIRONMENT:" - env - echo "C Compiler:" - gcc --version - - - name: Build V - run: CC=gcc make - - - name: Test V fixed tests - run: ./v test-self - - ubuntu-docker-musl: - runs-on: ubuntu-20.04 - timeout-minutes: 121 - container: - image: thevlang/vlang:ubuntu-build - env: - V_CI_MUSL: 1 - V_CI_UBUNTU_MUSL: 1 - VFLAGS: -cc musl-gcc - volumes: - - ${{github.workspace}}:/opt/vlang - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - 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: Test V fixed tests - run: ./v test-self