Switch to using GitHub actions for container CI
authorJonathan Dieter <jdieter@gmail.com>
Sat, 8 Jan 2022 22:33:08 +0000 (22:33 +0000)
committerJonathan Dieter <jdieter@gmail.com>
Sat, 8 Jan 2022 22:55:26 +0000 (22:55 +0000)
Signed-off-by: Jonathan Dieter <jdieter@gmail.com>
19 files changed:
.github/workflows/main.yml
autotest/alpine-edge/build.sh
autotest/alpine-edge/prep.sh
autotest/alpine-edge/test.sh
autotest/centos-7/build.sh
autotest/centos-7/prep.sh
autotest/centos-7/test.sh
autotest/debian-latest/build.sh
autotest/debian-latest/prep.sh
autotest/debian-latest/test.sh
autotest/fedora-latest/build.sh
autotest/fedora-latest/prep.sh
autotest/fedora-latest/test.sh
autotest/opensuse-leap/build.sh
autotest/opensuse-leap/prep.sh
autotest/opensuse-leap/test.sh
autotest/ubuntu-rolling/build.sh
autotest/ubuntu-rolling/prep.sh
autotest/ubuntu-rolling/test.sh

index 58c749bd2ff37022833b830ab5fca505ca6f716c..5cc98ec6645af1a4ba05b33d51dc932c36a3efc3 100644 (file)
@@ -14,33 +14,63 @@ jobs:
       fail-fast: false
       matrix:
         os: [ubuntu-latest, macos-latest, windows-latest]
+        container_directory: [none, fedora-latest, centos-7, alpine-edge]
+        exclude:
+          - os: macos-latest
+            container_directory: fedora-latest
+          - os: macos-latest
+            container_directory: centos-7
+          - os: macos-latest
+            container_directory: alpine-edge
+          - os: windows-latest
+            container_directory: fedora-latest
+          - os: windows-latest
+            container_directory: centos-7
+          - os: windows-latest
+            container_directory: alpine-edge
+          - os: ubuntu-latest
+            container_directory: none
 
     name: Compile and Run Tests
     steps:
       - uses: actions/checkout@v2
+
       - uses: actions/checkout@v2
+        if: runner.os == 'Windows'
         with:
           repository: wolfv/argp-standalone
           path: argp-standalone
 
       - name: install mamba
         uses: mamba-org/provision-with-micromamba@main
+        if: runner.os == 'Windows' || runner.os == 'macOS'
         with:
           environment-file: .github/environment.yml
-      - name: Compile zchunk
+
+      - name: Compile zchunk in container
+        if: runner.os == 'Linux'
+        run: ./autotest/${{ matrix.container_directory }}/build.sh
+
+      - name: Run zchunk tests in container
+        if: runner.os == 'Linux'
+        run: ./autotest/${{ matrix.container_directory }}/test.sh
+
+      - name: Compile zchunk on macOS
         shell: bash -l {0}
-        if: runner.os != 'Windows'
+        if: runner.os == 'macOS'
         run: |
           meson builddir --prefix=$CONDA_PREFIX
           cd builddir
           ninja
-      - name: Run zchunk tests
+
+      - name: Run zchunk tests on macOS
         shell: bash -l {0}
-        if: runner.os != 'Windows'
+        if: runner.os == 'macOS'
         run: |
           cd builddir
           ninja test
-      - name: Compile argp-standalone
+
+      - name: Compile argp-standalone for Windows
         shell: cmd /C CALL {0}
         if: runner.os == 'Windows'
         run: |
@@ -49,14 +79,16 @@ jobs:
           meson setup builddir
           meson compile -C builddir --prefix=%CONDA_PREFIX%\Library
           meson install -C builddir
-      - name: Compile zchunk
+
+      - name: Compile zchunk on Windows
         shell: cmd /C CALL {0}
         if: runner.os == 'Windows'
         run: |
           CALL micromamba activate zchunk_test_env
           meson setup builddir
           meson compile -C builddir
-      - name: Run zchunk tests
+
+      - name: Run zchunk tests on Windows
         shell: cmd /C CALL {0}
         if: runner.os == 'Windows'
         run: |
index a406c6c2bfb18f66428325fc185503843ed53f8f..a65f3d3b589440901f6387464b18091564c3519b 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Build zchunk-alpine:edge if it doesn't exist
 HAVE_IMAGE=$(docker image ls -q zchunk-alpine:edge)
 if [ "$HAVE_IMAGE" == "" ]; then
index 9a63b9a1206ac70beef077720f2df3d6231022e2..840ebc4bbedf54a9bd7684c0070362d1e0725a63 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 docker pull alpine:edge
 if [ "$?" -ne 0 ]; then
         exit 1
index 4cdc2e117e572c3ac4d4492f67a140235c7b2826..b2d1747ad55928f3e4505146091da57f6f688f03 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Build zchunk-alpine:edge if it doesn't exist
 HAVE_IMAGE=$(docker image ls -q zchunk-alpine:test)
 if [ "$HAVE_IMAGE" == "" ]; then
index 3064cddcf3e0bb75bef715d47ec7d95a151fb6cd..d95262d50fb7a2e7d6a9703d38683ae81d8728d2 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Build zchunk-centos:7 if it doesn't exist
 HAVE_IMAGE=$(docker image ls -q zchunk-centos:7)
 if [ "$HAVE_IMAGE" == "" ]; then
index a5e8098ec7ae0eb728be3ef9ab83cb3f4b2686ad..547d978f96940ca3e227ffcc9e451c99b0b82443 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 docker pull centos:7
 if [ "$?" -ne 0 ]; then
         exit 1
index 8034035553751f9ae19bfe86bc02e9e67e026b08..d9f86204c29fc5e724c1fcd0e498d07c37e6d669 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Build zchunk-centos:7 if it doesn't exist
 HAVE_IMAGE=$(docker image ls -q zchunk-centos:test)
 if [ "$HAVE_IMAGE" == "" ]; then
index c2c21b46135f984cd827fdd3c063efa0228ee5a5..243ed1c75b4b5f61c3b6f2c8c1e854715ba3c673 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Build zchunk-debian:latest if it doesn't exist
 HAVE_IMAGE=$(docker image ls -q zchunk-debian:latest)
 if [ "$HAVE_IMAGE" == "" ]; then
index b0a0ec88f5db96acafdf7675be569c8062458f7b..19d00dfef8dc18489a204f18ed8dd8f3c9d0d773 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 docker pull debian:latest
 if [ "$?" -ne 0 ]; then
         exit 1
index 4bc1ab4fa0f640b51b8816990af66fa5f6c1c28c..3f39e85b172022a151803d5331f0d8087cc29f3c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Build zchunk-debian:latest if it doesn't exist
 HAVE_IMAGE=$(docker image ls -q zchunk-debian:test)
 if [ "$HAVE_IMAGE" == "" ]; then
index d98896798526ab0777d14be06cdda7fc5c4d1961..a2cf8f867aa5dd1be5fd049e7ef5eef8cdcb8b32 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Build zchunk-fedora:latest if it doesn't exist
 HAVE_IMAGE=$(docker image ls -q zchunk-fedora:latest)
 if [ "$HAVE_IMAGE" == "" ]; then
index 9095923606a67ba87febae91402cb9e63e5d7230..19536fbe63fff173bf451c6b2c507fe823d7e248 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 docker pull fedora:latest
 if [ "$?" -ne 0 ]; then
         exit 1
index 3673dcfb4141a7755af1856d1657fa376de08794..3277cf59916bd2aaa1c56e640afdf35f106a25af 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Build zchunk-fedora:latest if it doesn't exist
 HAVE_IMAGE=$(docker image ls -q zchunk-fedora:test)
 if [ "$HAVE_IMAGE" == "" ]; then
index c1bf6124f2d739f742b402d4b5db198f5e984ae4..ecc1e185690eb554f4e05d9ff35725f0738a0494 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Build zchunk-opensuse:latest if it doesn't exist
 HAVE_IMAGE=$(docker image ls -q zchunk-opensuse:latest)
 if [ "$HAVE_IMAGE" == "" ]; then
index f1a0c893adc2f0881350ee752f034502a23b746a..c2e2bbb8820ccbe7751f447fa8d55f6602c1ceec 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 docker pull opensuse/leap
 if [ "$?" -ne 0 ]; then
         exit 1
index 93fdb4f20035038b5fe88fa77b8374a4078b49cd..e4f52a3b3fd2f4d1ee6d221565667e3d8719f542 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Build zchunk-opensuse:latest if it doesn't exist
 HAVE_IMAGE=$(docker image ls -q zchunk-opensuse:test)
 if [ "$HAVE_IMAGE" == "" ]; then
index a48420099084177fe64060ad59bffcbf090cc514..ab8c4ff369a23c00a1d6b22d2a6a1b6558807657 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Build zchunk-ubuntu:latest if it doesn't exist
 HAVE_IMAGE=$(docker image ls -q zchunk-ubuntu:latest)
 if [ "$HAVE_IMAGE" == "" ]; then
index 79ae5bb631f3a22412d58697b708d201be8084c6..8dcbfd3b7ac7b02fcdb757069c6e7834b53075fe 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 docker pull ubuntu:rolling
 if [ "$?" -ne 0 ]; then
         exit 1
index b2345b3ec151ab3ebff6f842b47a6121bf851ad9..abc2ab01eb7fb348690b26e12d244f72bb92454d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Build zchunk-ubuntu:latest if it doesn't exist
 HAVE_IMAGE=$(docker image ls -q zchunk-ubuntu:test)
 if [ "$HAVE_IMAGE" == "" ]; then