Add CI for testing arm64 docker (#2315)

* Add CI for testing build of docker-arm64

* Add specs check to dockerfiles
This commit is contained in:
syeopite 2021-08-09 22:34:52 -07:00 committed by GitHub
parent 81e77693b2
commit 637a5cc14f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 0 deletions

View File

@ -91,3 +91,29 @@ jobs:
- name: Test Docker - name: Test Docker
run: while curl -Isf http://localhost:3000; do sleep 1; done run: while curl -Isf http://localhost:3000; do sleep 1; done
build-docker-arm64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build Docker ARM64 image
uses: docker/build-push-action@v2
with:
context: .
file: docker/Dockerfile.arm64
platforms: linux/arm64/v8
- name: Test Docker
run: while curl -Isf http://localhost:3000; do sleep 1; done

View File

@ -43,6 +43,10 @@ COPY ./src/ ./src/
# TODO: .git folder is required for building this is destructive. # TODO: .git folder is required for building this is destructive.
# See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION. # See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION.
COPY ./.git/ ./.git/ COPY ./.git/ ./.git/
RUN crystal spec --warnings all \
--link-flags "-lxml2 -llzma"
RUN crystal build ./src/invidious.cr \ RUN crystal build ./src/invidious.cr \
--static --warnings all \ --static --warnings all \
--link-flags "-lxml2 -llzma" --link-flags "-lxml2 -llzma"

View File

@ -43,6 +43,10 @@ COPY ./src/ ./src/
# TODO: .git folder is required for building this is destructive. # TODO: .git folder is required for building this is destructive.
# See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION. # See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION.
COPY ./.git/ ./.git/ COPY ./.git/ ./.git/
RUN crystal spec --warnings all \
--link-flags "-lxml2 -llzma"
RUN crystal build ./src/invidious.cr \ RUN crystal build ./src/invidious.cr \
--static --warnings all \ --static --warnings all \
--link-flags "-lxml2 -llzma" --link-flags "-lxml2 -llzma"