summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/ci.yml26
-rw-r--r--docker/Dockerfile4
-rw-r--r--docker/Dockerfile.arm644
3 files changed, 34 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 00302f28..fa6f9e33 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -91,3 +91,29 @@ jobs:
- name: Test Docker
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
+
+
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 9a535414..0b6c6ceb 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -43,6 +43,10 @@ COPY ./src/ ./src/
# TODO: .git folder is required for building – this is destructive.
# See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION.
COPY ./.git/ ./.git/
+
+RUN crystal spec --warnings all \
+ --link-flags "-lxml2 -llzma"
+
RUN crystal build ./src/invidious.cr \
--static --warnings all \
--link-flags "-lxml2 -llzma"
diff --git a/docker/Dockerfile.arm64 b/docker/Dockerfile.arm64
index 1ec95d8a..54226b66 100644
--- a/docker/Dockerfile.arm64
+++ b/docker/Dockerfile.arm64
@@ -43,6 +43,10 @@ COPY ./src/ ./src/
# TODO: .git folder is required for building – this is destructive.
# See definition of CURRENT_BRANCH, CURRENT_COMMIT and CURRENT_VERSION.
COPY ./.git/ ./.git/
+
+RUN crystal spec --warnings all \
+ --link-flags "-lxml2 -llzma"
+
RUN crystal build ./src/invidious.cr \
--static --warnings all \
--link-flags "-lxml2 -llzma"