mirror of
https://github.com/dgtlmoon/changedetection.io.git
synced 2025-11-07 18:17:19 +00:00
Compare commits
5 Commits
parallel-d
...
aarch64
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e23e099d4a | ||
|
|
bff6eb3bcf | ||
|
|
10fc5d669b | ||
|
|
89be3c50d5 | ||
|
|
3a1f1a9a5a |
85
.github/workflows/test-container-build.yml
vendored
85
.github/workflows/test-container-build.yml
vendored
@@ -1,10 +1,5 @@
|
|||||||
name: ChangeDetection.io Container Build Test
|
name: ChangeDetection.io Container Build Test
|
||||||
|
|
||||||
# Triggers the workflow on push or pull request events
|
|
||||||
|
|
||||||
# This line doesnt work, even tho it is the documented one
|
|
||||||
#on: [push, pull_request]
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
@@ -20,51 +15,53 @@ on:
|
|||||||
- .github/workflows/*
|
- .github/workflows/*
|
||||||
- .github/test/Dockerfile*
|
- .github/test/Dockerfile*
|
||||||
|
|
||||||
# Changes to requirements.txt packages and Dockerfile may or may not always be compatible with arm etc, so worth testing
|
|
||||||
# @todo: some kind of path filter for requirements.txt and Dockerfile
|
|
||||||
jobs:
|
jobs:
|
||||||
test-container-build:
|
test-container-build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python_version: [3.11, 3.12, 3.13]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Python 3.11
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
|
||||||
python-version: 3.11
|
|
||||||
|
|
||||||
# Just test that the build works, some libraries won't compile on ARM/rPi etc
|
- name: Set up Python ${{ matrix.python_version }}
|
||||||
- name: Set up QEMU
|
uses: actions/setup-python@v5
|
||||||
uses: docker/setup-qemu-action@v3
|
with:
|
||||||
with:
|
python-version: ${{ matrix.python_version }}
|
||||||
image: tonistiigi/binfmt:latest
|
|
||||||
platforms: all
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
# Set up QEMU
|
||||||
id: buildx
|
- name: Set up QEMU
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
with:
|
with:
|
||||||
install: true
|
image: tonistiigi/binfmt:latest
|
||||||
version: latest
|
platforms: all
|
||||||
driver-opts: image=moby/buildkit:master
|
|
||||||
|
|
||||||
# https://github.com/dgtlmoon/changedetection.io/pull/1067
|
- name: Set up Docker Buildx
|
||||||
# Check we can still build under alpine/musl
|
id: buildx
|
||||||
- name: Test that the docker containers can build (musl via alpine check)
|
uses: docker/setup-buildx-action@v3
|
||||||
id: docker_build_musl
|
with:
|
||||||
uses: docker/build-push-action@v6
|
install: true
|
||||||
with:
|
version: latest
|
||||||
context: ./
|
driver-opts: image=moby/buildkit:master
|
||||||
file: ./.github/test/Dockerfile-alpine
|
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
|
|
||||||
- name: Test that the docker containers can build
|
# Musl (alpine) build test (runs once per matrix job, or can skip with conditional if needed)
|
||||||
id: docker_build
|
- name: Test that the docker containers can build (musl via alpine check)
|
||||||
uses: docker/build-push-action@v6
|
id: docker_build_musl
|
||||||
# https://github.com/docker/build-push-action#customizing
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: ./
|
context: ./
|
||||||
file: ./Dockerfile
|
file: ./.github/test/Dockerfile-alpine
|
||||||
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8,linux/arm64/v8
|
platforms: linux/amd64,linux/arm64
|
||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache
|
|
||||||
|
|
||||||
|
# Main build with matrix Python version
|
||||||
|
- name: Test that the docker containers can build (Python ${{ matrix.python_version }})
|
||||||
|
id: docker_build
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: ./
|
||||||
|
file: ./Dockerfile
|
||||||
|
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v8,linux/arm64/v8,linux/aarch64
|
||||||
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
|
cache-to: type=local,dest=/tmp/.buildx-cache
|
||||||
|
build: |
|
||||||
|
args=PYTHON_VERSION=${{ matrix.python_version }}
|
||||||
|
|||||||
Reference in New Issue
Block a user