diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b83bf2403..de02b8e6b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -3,6 +3,35 @@ name: tests on: [push, pull_request] jobs: + # OSX tests do not run in Docker, and use the actions-rs Rust installaction + tests-osx: + name: tests (Mac OS X latest) + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + + - name: Cache cargo registry + uses: actions/cache@v2 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-stable-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache cargo build + uses: actions/cache@v2 + with: + path: target + key: ${{ runner.os }}-stable-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + + - uses: actions-rs/toolchain@v1 + with: + toolchain: "stable" + override: true + + - name: Test OSX + run: bash test/scripts/test_osx.sh + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + tests: strategy: fail-fast: false @@ -41,30 +70,11 @@ jobs: - name: "Archlinux Base (Rolling)" runner: ubuntu-latest dockerfile: arch - - name: "Mac OS X 10.13" - runner: macos-latest - dockerfile: osx runs-on: ${{ matrix.runner }} continue-on-error: ${{ matrix.continue-on-error == true }} steps: - uses: actions/checkout@v2 - - name: Cache cargo registry - uses: actions/cache@v2 - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-stable-cargo-registry-${{ hashFiles('**/Cargo.lock') }} - - - name: Cache cargo build - uses: actions/cache@v2 - with: - path: target - key: ${{ runner.os }}-stable-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} - - - uses: actions-rs/toolchain@v1 - with: - toolchain: "stable" - override: true - name: Build ${{ matrix.name }} env: DOCKER_REGISTRY: docker.pkg.github.com @@ -72,9 +82,10 @@ jobs: GITHUB_USER: ${{ github.actor }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CONTAINER: ${{ matrix.dockerfile }} - run: if [[ $CONTAINER != "osx" ]]; then docker-compose build test-$CONTAINER ; fi + run: docker-compose build test-$CONTAINER + - name: Test ${{ matrix.name }} - run: if [[ $CONTAINER != "osx" ]]; then docker-compose run test-$CONTAINER; else bash test/scripts/test_osx.sh ; fi + run: docker-compose run test-$CONTAINER env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CONTAINER: ${{ matrix.dockerfile }} diff --git a/test/docker/arch b/test/docker/arch index ae810ac06..8112cc005 100644 --- a/test/docker/arch +++ b/test/docker/arch @@ -2,15 +2,21 @@ FROM archlinux/archlinux:base-devel RUN pacman -Sy --noconfirm archlinux-keyring RUN pacman -Syyu --noconfirm -RUN pacman -S --noconfirm gnutls util-linux bash-completion cmake python3 git libfaketime +RUN pacman -S --noconfirm gnutls util-linux bash-completion cmake python3 git libfaketime curl # Setup language environment ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update diff --git a/test/docker/centos7 b/test/docker/centos7 index 8cb75e03a..7748d6f09 100644 --- a/test/docker/centos7 +++ b/test/docker/centos7 @@ -3,7 +3,7 @@ FROM centos:7 RUN yum update -y RUN yum install python3 git gcc gcc-c++ make gnutls-devel libuuid-devel -y RUN yum install epel-release centos-release-scl -y -RUN yum install which cmake3 devtoolset-7-gcc* libfaketime -y +RUN yum install which cmake3 devtoolset-7-gcc* libfaketime curl -y RUN source scl_source enable devtoolset-7; gcc --version; cmake3 --version RUN ln -s /usr/bin/cmake3 /usr/bin/cmake @@ -12,9 +12,15 @@ ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update diff --git a/test/docker/centos8 b/test/docker/centos8 index e70ec2d24..be1ba3e3f 100644 --- a/test/docker/centos8 +++ b/test/docker/centos8 @@ -7,7 +7,7 @@ RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org| RUN dnf update -y RUN dnf install python3 git gcc gcc-c++ make gnutls-devel libuuid-devel glibc-langpack-en -y RUN dnf install epel-release -y -RUN dnf install which cmake libfaketime -y +RUN dnf install which cmake libfaketime curl -y RUN gcc --version; cmake --version # Setup language environment @@ -15,9 +15,15 @@ ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update diff --git a/test/docker/debianstable b/test/docker/debianstable index d36f0356c..8a672c11b 100644 --- a/test/docker/debianstable +++ b/test/docker/debianstable @@ -2,16 +2,22 @@ FROM debian:stable RUN apt-get update RUN apt-get install -y build-essential cmake git uuid-dev libgnutls28-dev faketime -RUN apt-get install -y python3 +RUN apt-get install -y python3 curl # Setup language environment ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update diff --git a/test/docker/debiantesting b/test/docker/debiantesting index f38026c21..43aac0bab 100644 --- a/test/docker/debiantesting +++ b/test/docker/debiantesting @@ -2,16 +2,22 @@ FROM debian:testing RUN apt-get update RUN apt-get install -y build-essential cmake git uuid-dev libgnutls28-dev faketime -RUN apt-get install -y python3 +RUN apt-get install -y python3 curl # Setup language environment ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update diff --git a/test/docker/fedora32 b/test/docker/fedora32 index d6583eeca..839ce4be8 100644 --- a/test/docker/fedora32 +++ b/test/docker/fedora32 @@ -1,16 +1,22 @@ FROM fedora:32 RUN dnf update -y -RUN dnf install python3 git gcc gcc-c++ cmake make gnutls-devel libuuid-devel libfaketime glibc-langpack-en -y +RUN dnf install python3 git gcc gcc-c++ cmake make gnutls-devel libuuid-devel libfaketime glibc-langpack-en curl -y # Setup language environment ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update diff --git a/test/docker/fedora33 b/test/docker/fedora33 index 94d8be379..724e147e5 100644 --- a/test/docker/fedora33 +++ b/test/docker/fedora33 @@ -1,16 +1,22 @@ FROM fedora:33 RUN dnf update -y -RUN dnf install python3 git gcc gcc-c++ cmake make gnutls-devel libuuid-devel libfaketime glibc-langpack-en -y +RUN dnf install python3 git gcc gcc-c++ cmake make gnutls-devel libuuid-devel libfaketime glibc-langpack-en curl -y # Setup language environment ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update diff --git a/test/docker/fedora34 b/test/docker/fedora34 index f3c4a1fee..46136444a 100644 --- a/test/docker/fedora34 +++ b/test/docker/fedora34 @@ -1,16 +1,22 @@ FROM fedora:34 RUN dnf update -y -RUN dnf install python3 git gcc gcc-c++ cmake make gnutls-devel libuuid-devel libfaketime glibc-langpack-en -y +RUN dnf install python3 git gcc gcc-c++ cmake make gnutls-devel libuuid-devel libfaketime glibc-langpack-en curl -y # Setup language environment ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update diff --git a/test/docker/fedora35 b/test/docker/fedora35 index e8293f0c3..18e973f0f 100644 --- a/test/docker/fedora35 +++ b/test/docker/fedora35 @@ -1,16 +1,22 @@ FROM fedora:35 RUN dnf update -y -RUN dnf install python3 git gcc gcc-c++ cmake make gnutls-devel libuuid-devel libfaketime glibc-langpack-en -y +RUN dnf install python3 git gcc gcc-c++ cmake make gnutls-devel libuuid-devel libfaketime glibc-langpack-en curl -y # Setup language environment ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update diff --git a/test/docker/gentoo b/test/docker/gentoo index 647eac842..71e9d50aa 100644 --- a/test/docker/gentoo +++ b/test/docker/gentoo @@ -7,16 +7,22 @@ FROM gentoo/stage3-x86:latest # copy the entire portage volume in COPY --from=portage /usr/portage /usr/portage -RUN emerge -qv sys-libs/readline:0 net-libs/gnutls:0= sys-apps/util-linux dev-util/cmake sys-devel/make dev-vcs/git sys-libs/libfaketime +RUN emerge -qv sys-libs/readline:0 net-libs/gnutls:0= sys-apps/util-linux dev-util/cmake sys-devel/make dev-vcs/git sys-libs/libfaketime net-misc/curl # Setup language environment ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update diff --git a/test/docker/opensuse15 b/test/docker/opensuse15 index 6b896a073..1c79542ec 100644 --- a/test/docker/opensuse15 +++ b/test/docker/opensuse15 @@ -1,15 +1,21 @@ FROM opensuse/leap:15 -RUN zypper install -y python3 awk coreutils git gcc gcc-c++ cmake make libgnutls-devel libuuid-devel libfaketime +RUN zypper install -y python3 awk coreutils git gcc gcc-c++ cmake make libgnutls-devel libuuid-devel libfaketime curl # Setup language environment ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update diff --git a/test/docker/ubuntu1604 b/test/docker/ubuntu1604 index 13904007e..5f39b45e1 100644 --- a/test/docker/ubuntu1604 +++ b/test/docker/ubuntu1604 @@ -1,7 +1,7 @@ FROM ubuntu:16.04 RUN apt-get update -RUN apt-get install -y build-essential cmake git uuid-dev libgnutls28-dev faketime locales python3 +RUN apt-get install -y build-essential cmake git uuid-dev libgnutls28-dev faketime locales python3 curl # Setup language environment RUN locale-gen en_US.UTF-8 @@ -9,9 +9,15 @@ ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update diff --git a/test/docker/ubuntu1804 b/test/docker/ubuntu1804 index 77bd33b4c..038a9a1b8 100644 --- a/test/docker/ubuntu1804 +++ b/test/docker/ubuntu1804 @@ -1,7 +1,7 @@ FROM ubuntu:18.04 RUN apt-get update -RUN apt-get install -y build-essential cmake git uuid-dev libgnutls28-dev faketime locales python3 +RUN apt-get install -y build-essential cmake git uuid-dev libgnutls28-dev faketime locales python3 curl # Setup language environment RUN locale-gen en_US.UTF-8 @@ -9,9 +9,15 @@ ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update diff --git a/test/docker/ubuntu2004 b/test/docker/ubuntu2004 index 7e34f56a9..e783e8d20 100644 --- a/test/docker/ubuntu2004 +++ b/test/docker/ubuntu2004 @@ -1,7 +1,7 @@ FROM ubuntu:20.04 RUN apt-get update -RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y build-essential cmake git uuid-dev libgnutls28-dev faketime locales python3 +RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y build-essential cmake git uuid-dev libgnutls28-dev faketime locales python3 curl # Setup language environment RUN locale-gen en_US.UTF-8 @@ -9,9 +9,15 @@ ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update diff --git a/test/docker/ubuntu2204 b/test/docker/ubuntu2204 index 211ac2ba0..5dc30996b 100644 --- a/test/docker/ubuntu2204 +++ b/test/docker/ubuntu2204 @@ -1,7 +1,7 @@ FROM ubuntu:22.04 RUN apt-get update -RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y build-essential cmake git uuid-dev libgnutls28-dev faketime locales python3 +RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y build-essential cmake git uuid-dev libgnutls28-dev faketime locales python3 curl # Setup language environment RUN locale-gen en_US.UTF-8 @@ -9,9 +9,15 @@ ENV LC_ALL en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US.UTF-8 -# Setup taskwarrior +# Add source directory ADD . /root/code/ WORKDIR /root/code/ + +# Setup Rust +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh && \ + sh rustup.sh -y --profile minimal --default-toolchain stable --component rust-docs + +# Setup taskwarrior RUN git clean -dfx RUN git submodule init RUN git submodule update