Consolidate current racket-ci images into a single one (#3230)
This simplifies jobs (like PR jobs) that have to build and test in a single container and cannot choose between build or test images.
This commit is contained in:
parent
f508bb25ab
commit
31c5644cf5
12
.github/images/Dockerfile
vendored
Normal file
12
.github/images/Dockerfile
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
FROM debian:buster-slim
|
||||||
|
LABEL maintainer="pmatos@linki.tools"
|
||||||
|
LABEL description="Debian Stable Slim image with Racket dependencies pre-installed. Mostly used for Racket CI."
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get upgrade -y && \
|
||||||
|
apt-get install -y ca-certificates clang curl gcc git libcairo2-dev libffi-dev libfindbin-libs-perl libfontconfig1-dev libgtk2.0-0 libjpeg-dev libpango1.0-dev libturbojpeg0-dev libxml2-dev make openssl procps python sqlite sudo unzip uuid-dev wget && \
|
||||||
|
curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
|
||||||
|
apt-get update && apt-get install -y nodejs && \
|
||||||
|
apt-get clean
|
||||||
|
|
||||||
|
CMD ["bash"]
|
11
.github/images/README.md
vendored
Normal file
11
.github/images/README.md
vendored
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# Docker images for CI
|
||||||
|
|
||||||
|
In order to speed up building and testing of Racket, we have prepared some Docker images.
|
||||||
|
Currently pushed to DockerHub under the racket/racket-ci repo. This is then used in the CI
|
||||||
|
configuration with:
|
||||||
|
```
|
||||||
|
image: "racket/racket-ci:latest"
|
||||||
|
```
|
||||||
|
|
||||||
|
The image is automatically built and uploaded on all relevant commits through GitHub Actions.
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
FROM debian:buster-slim
|
|
||||||
LABEL maintainer="pmatos@linki.tools"
|
|
||||||
LABEL description="Debian Stable Slim image with Racket build dependencies pre-installed. Mostly used for Racket CI."
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get upgrade -y && \
|
|
||||||
apt-get install -y unzip python libxml2-dev libfindbin-libs-perl make gcc uuid-dev git clang && \
|
|
||||||
apt-get clean
|
|
||||||
|
|
||||||
CMD ["bash"]
|
|
|
@ -1,12 +0,0 @@
|
||||||
FROM debian:buster-slim
|
|
||||||
LABEL maintainer="pmatos@linki.tools"
|
|
||||||
LABEL description="Debian Stable Slim image with Racket test dependencies pre-installed. Mostly used for Racket CI."
|
|
||||||
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get upgrade -y && \
|
|
||||||
apt-get install -y libffi-dev make git uuid-dev unzip python libxml2-dev libgtk2.0-0 sudo wget curl openssl ca-certificates libfontconfig1-dev libpango1.0-dev libcairo2-dev libjpeg-dev libturbojpeg0-dev gcc sqlite procps && \
|
|
||||||
curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
|
|
||||||
apt-get update && apt-get install -y nodejs && \
|
|
||||||
apt-get clean
|
|
||||||
|
|
||||||
CMD ["bash"]
|
|
16
.github/workflows/DockerImages/Makefile
vendored
16
.github/workflows/DockerImages/Makefile
vendored
|
@ -1,16 +0,0 @@
|
||||||
all: push-builddeps push-testdeps
|
|
||||||
|
|
||||||
.PHONY: push-builddeps push-testdeps build-testdeps build-testdeps
|
|
||||||
|
|
||||||
push-builddeps: build-builddeps
|
|
||||||
docker push pmatos/racket-ci:builddeps
|
|
||||||
|
|
||||||
build-builddeps: Dockerfile.builddeps
|
|
||||||
docker build --file Dockerfile.builddeps --tag pmatos/racket-ci:builddeps .
|
|
||||||
|
|
||||||
push-testdeps: build-testdeps
|
|
||||||
docker push pmatos/racket-ci:testdeps
|
|
||||||
|
|
||||||
build-testdeps: Dockerfile.testdeps
|
|
||||||
docker build --file Dockerfile.testdeps --tag pmatos/racket-ci:testdeps .
|
|
||||||
|
|
18
.github/workflows/DockerImages/README.md
vendored
18
.github/workflows/DockerImages/README.md
vendored
|
@ -1,18 +0,0 @@
|
||||||
# Docker images for CI
|
|
||||||
|
|
||||||
In order to speed up building and testing of Racket, we have prepared some Docker images.
|
|
||||||
Currently pushed to DockerHub under the racket/racket-ci repo. This is then used in the CI
|
|
||||||
configuration with:
|
|
||||||
```
|
|
||||||
image: "racket/racket-ci:testdeps" # for testing jobs
|
|
||||||
```
|
|
||||||
|
|
||||||
or:
|
|
||||||
```
|
|
||||||
image: "racket/racket-ci:builddeps" # for build jobs
|
|
||||||
```
|
|
||||||
|
|
||||||
The images are automatically build and uploaded on all commits by Docker Hub.
|
|
||||||
|
|
||||||
To update manually, use the Makefile in this directory, but you need to be logged in - use `docker login`.
|
|
||||||
|
|
2
.github/workflows/ci-pr.yml
vendored
2
.github/workflows/ci-pr.yml
vendored
|
@ -6,7 +6,7 @@ jobs:
|
||||||
|
|
||||||
buildtest-linux:
|
buildtest-linux:
|
||||||
container:
|
container:
|
||||||
image: racket/racket-ci:testdeps
|
image: racket/racket-ci:latest
|
||||||
options: --init
|
options: --init
|
||||||
|
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
|
12
.github/workflows/ci-push_linux.yml
vendored
12
.github/workflows/ci-push_linux.yml
vendored
|
@ -11,7 +11,7 @@ jobs:
|
||||||
build-racketcgc:
|
build-racketcgc:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
container:
|
container:
|
||||||
image: racket/racket-ci:builddeps
|
image: racket/racket-ci:latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
@ -62,7 +62,7 @@ jobs:
|
||||||
build-racket3m:
|
build-racket3m:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
container:
|
container:
|
||||||
image: racket/racket-ci:builddeps
|
image: racket/racket-ci:latest
|
||||||
|
|
||||||
needs: build-racketcgc
|
needs: build-racketcgc
|
||||||
|
|
||||||
|
@ -146,7 +146,7 @@ jobs:
|
||||||
build-racketcs:
|
build-racketcs:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
container:
|
container:
|
||||||
image: racket/racket-ci:builddeps
|
image: racket/racket-ci:latest
|
||||||
|
|
||||||
needs: build-racketcgc
|
needs: build-racketcgc
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ jobs:
|
||||||
test-cgc:
|
test-cgc:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
container:
|
container:
|
||||||
image: racket/racket-ci:testdeps
|
image: racket/racket-ci:latest
|
||||||
options: --init
|
options: --init
|
||||||
|
|
||||||
needs: build-racketcgc
|
needs: build-racketcgc
|
||||||
|
@ -277,7 +277,7 @@ jobs:
|
||||||
test-3m:
|
test-3m:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
container:
|
container:
|
||||||
image: racket/racket-ci:testdeps
|
image: racket/racket-ci:latest
|
||||||
options: --init
|
options: --init
|
||||||
|
|
||||||
needs: build-racket3m
|
needs: build-racket3m
|
||||||
|
@ -351,7 +351,7 @@ jobs:
|
||||||
test-cs:
|
test-cs:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
container:
|
container:
|
||||||
image: racket/racket-ci:testdeps
|
image: racket/racket-ci:latest
|
||||||
options: --init
|
options: --init
|
||||||
|
|
||||||
needs: build-racketcs
|
needs: build-racketcs
|
||||||
|
|
4
.github/workflows/ci-ubsan.yml
vendored
4
.github/workflows/ci-ubsan.yml
vendored
|
@ -8,7 +8,7 @@ jobs:
|
||||||
# These jobs build Racket using the sanitizers and gather the results into a final log
|
# These jobs build Racket using the sanitizers and gather the results into a final log
|
||||||
racket3m-ubsan:
|
racket3m-ubsan:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
container: racket/racket-ci:testdeps
|
container: racket/racket-ci:latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -92,7 +92,7 @@ jobs:
|
||||||
|
|
||||||
racketcs-ubsan:
|
racketcs-ubsan:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
container: racket/racket-ci:testdeps
|
container: racket/racket-ci:latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
30
.github/workflows/docker-racketci-testdeps.yml
vendored
30
.github/workflows/docker-racketci-testdeps.yml
vendored
|
@ -1,30 +0,0 @@
|
||||||
name: Build TestDeps RacketCI Image
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
paths:
|
|
||||||
- '.github/workflows/DockerImages/Dockerfile.testdeps'
|
|
||||||
- '.github/workflows/docker-racketci-testdeps.yml'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-image:
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
|
|
||||||
env:
|
|
||||||
IMAGE_NAME: racket-ci
|
|
||||||
VERSION: testdeps
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Build image
|
|
||||||
working-directory: ./.github/workflows/DockerImages
|
|
||||||
run: docker build --tag image --file Dockerfile.testdeps .
|
|
||||||
- name: Log into registry
|
|
||||||
run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login -u pmatos --password-stdin
|
|
||||||
- name: Push image
|
|
||||||
run: |
|
|
||||||
IMAGE_ID=racket/$IMAGE_NAME
|
|
||||||
docker tag image $IMAGE_ID:$VERSION
|
|
||||||
docker push $IMAGE_ID:$VERSION
|
|
|
@ -1,12 +1,12 @@
|
||||||
name: Build BuildDeps RacketCI Image
|
name: Build RacketCI Docker Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths:
|
paths:
|
||||||
- '.github/workflows/DockerImages/Dockerfile.builddeps'
|
- '.github/images/Dockerfile'
|
||||||
- '.github/workflows/docker-racketci-builddeps.yml'
|
- '.github/workflows/docker-racketci.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-image:
|
build-image:
|
||||||
|
@ -14,13 +14,13 @@ jobs:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE_NAME: racket-ci
|
IMAGE_NAME: racket-ci
|
||||||
VERSION: builddeps
|
VERSION: ${{ github.sha }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Build image
|
- name: Build image
|
||||||
working-directory: ./.github/workflows/DockerImages
|
working-directory: ./.github/images
|
||||||
run: docker build --tag image --file Dockerfile.builddeps .
|
run: docker build --tag image .
|
||||||
- name: Log into registry
|
- name: Log into registry
|
||||||
run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login -u pmatos --password-stdin
|
run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login -u pmatos --password-stdin
|
||||||
- name: Push image
|
- name: Push image
|
||||||
|
@ -28,3 +28,5 @@ jobs:
|
||||||
IMAGE_ID=racket/$IMAGE_NAME
|
IMAGE_ID=racket/$IMAGE_NAME
|
||||||
docker tag image $IMAGE_ID:$VERSION
|
docker tag image $IMAGE_ID:$VERSION
|
||||||
docker push $IMAGE_ID:$VERSION
|
docker push $IMAGE_ID:$VERSION
|
||||||
|
docker tag image $IMAGE_ID:latest
|
||||||
|
docker push $IMAGE_ID:latest
|
Loading…
Reference in New Issue
Block a user