install Rust on each push in docker images

This commit is contained in:
Dustin J. Mitchell 2022-07-07 00:39:36 +00:00 committed by Tomas Babej
parent 3dfd28586a
commit 6f7c5c31a9
16 changed files with 152 additions and 51 deletions

View file

@ -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 }}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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