Skip to content

Commit

Permalink
Make tier3 work with arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
quantum5 committed Sep 21, 2021
1 parent 302bb1e commit 4bdfa63
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,17 @@ jobs:
run: make TAG=aarch64-latest image-tier2
- name: Test tier 2 Docker image
run: make TAG=aarch64-latest test-tier2
- name: Build tier 3 Docker image
run: make TAG=aarch64-latest image-tier3
- name: Test tier 3 Docker image
run: make TAG=aarch64-latest test-tier3
- name: Push images to Docker
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref == 'refs/heads/master'
run: |
echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
docker push dmoj/runtimes-tier1:aarch64-latest
docker push dmoj/runtimes-tier2:aarch64-latest
docker push dmoj/runtimes-tier3:aarch64-latest
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
Expand All @@ -82,6 +87,7 @@ jobs:
echo "$CR_PAT" | docker login ghcr.io -u "$CR_USER" --password-stdin
docker push ghcr.io/dmoj/runtimes-tier1:aarch64-latest
docker push ghcr.io/dmoj/runtimes-tier2:aarch64-latest
docker push ghcr.io/dmoj/runtimes-tier3:aarch64-latest
env:
CR_USER: ${{ secrets.CR_USER }}
CR_PAT: ${{ secrets.CR_PAT }}
24 changes: 15 additions & 9 deletions tier3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
FROM dmoj/runtimes-tier2

RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo 'deb [arch=amd64] https://storage.googleapis.com/download.dartlang.org/linux/debian stable main' > /etc/apt/sources.list.d/dart.list && \
RUN (cd /opt && \
case "$(arch)" in x86_64) DART_ARCH=x64;; aarch64) DART_ARCH=arm64;; *) false;; esac && \
curl -L -odart.zip "https://storage.googleapis.com/dart-archive/channels/stable/release/$( \
curl -sSL https://storage.googleapis.com/dart-archive/channels/stable/release/latest/VERSION | jq -r .version \
)/sdk/dartsdk-linux-$DART_ARCH-release.zip" && \
unzip dart.zip && find /opt/dart-sdk -type d -exec chmod go+rx {} + && rm dart.zip) && \
apt-get update && \
apt-get install -y --no-install-recommends unzip libtinfo5 xz-utils \
coffeescript gnucobol4 gnat gfortran tcl lua5.3 intercal php-cli dart/stable gforth swi-prolog pike8.0 sbcl && \
coffeescript gnucobol4 gnat gfortran tcl lua5.3 intercal php-cli gforth swi-prolog pike8.0 sbcl && \
rm -rf /var/lib/apt/lists/* && \
mkdir /opt/swift && \
curl "$(echo -n https://swift.org; curl -s https://swift.org/download/ | grep 'Ubuntu 18.04' | grep 5.4 | head -n 1 | cut -d'"' -f 2)" | \
tar xz -C /opt/swift --strip-components=1 && \
if [ "$(arch)" = x86_64 ]; then \
curl "https://swift.org$(curl -s https://swift.org/download/ | grep 'Ubuntu 18.04' | grep 5.4 | head -n 1 | cut -d'"' -f 2)" | \
tar xz -C /opt/swift --strip-components=1; fi && \
curl -L -ogroovy.zip "$(curl -s https://groovy.apache.org/download.html | perl -ne 'if(/(['"'"'"])(https:[^'"'"'"]+-binary-[\d.]+\.zip)\1/){print$2;exit}')" && \
unzip groovy.zip && \
mkdir /opt/groovy && \
Expand All @@ -17,9 +22,10 @@ RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &
curl -L -okotlin.zip "$(curl -s https://api.github.com/repos/JetBrains/kotlin/releases | \
jq -r '[.[] | select(.prerelease | not) | .assets | flatten | .[] | select(.name | startswith("kotlin-compiler")) | .browser_download_url][0]')" && \
unzip kotlin.zip && mv kotlinc /opt/kotlin && rm kotlin.zip && \
curl -L -otprolog.zip "https://github.com/yingted/OpenTuring/releases/download/v1.0.0-beta/tprolog-v1.0.0-beta.zip" && \
unzip tprolog.zip && mv tprolog /opt && rm tprolog.zip && \
if [ "$(arch)" = x86_64 ]; then \
curl -L -otprolog.zip "https://github.com/yingted/OpenTuring/releases/download/v1.0.0-beta/tprolog-v1.0.0-beta.zip" && \
unzip tprolog.zip && mv tprolog /opt && rm tprolog.zip; fi && \
mkdir /opt/zig && \
curl "https://ziglang.org/download/0.6.0/zig-linux-x86_64-0.6.0.tar.xz" | tar xJ -C /opt/zig --strip-components=1
curl "https://ziglang.org/download/0.6.0/zig-linux-$(arch)-0.6.0.tar.xz" | tar xJ -C /opt/zig --strip-components=1
ENV PATH "/opt/tprolog:/opt/groovy/bin:/opt/kotlin/bin:${PATH}:/opt/swift/usr/bin:/opt/zig"
ENV PATH "/opt/tprolog:/opt/groovy/bin:/opt/kotlin/bin:/opt/dart-sdk/bin:${PATH}:/opt/swift/usr/bin:/opt/zig"

0 comments on commit 4bdfa63

Please sign in to comment.