From 6b3142a867e6eaba06a8c6766b2a5ec348b3b117 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ad=C3=A1n=20SDPC?= Date: Tue, 18 Oct 2022 11:34:28 +0200 Subject: [PATCH] fix(cd): target specific ubuntu versions and ensure execution permissions --- .github/workflows/master.yml | 4 ++++ docker/cross-compilation/aarch64-unknown-linux-gnu/Dockerfile | 2 +- .../cross-compilation/arm-unknown-linux-gnueabihf/Dockerfile | 2 +- .../armv7-unknown-linux-gnueabihf/Dockerfile | 2 +- docker/cross-compilation/x86_64-unknown-linux-gnu/Dockerfile | 2 +- docker/witnet-rust/Dockerfile | 2 +- docker/witnet-rust/downloader.sh | 4 ++++ 7 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index e0d4659f8b..eee2c4fd6d 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -133,6 +133,10 @@ jobs: - name: Building Macos Binary run: MACOSX_DEPLOYMENT_TARGET=10.12 OPENSSL_STATIC=1 OPENSSL_DIR="/usr/local/opt/openssl" cargo build --release -p witnet -p witnet_toolkit + # Ensure that distributable binary files can be executed + - name: Make binaries executable + run: chmod +x target/release/witnet* + # Upload Build Releases - uses: actions/upload-artifact@v3 with: diff --git a/docker/cross-compilation/aarch64-unknown-linux-gnu/Dockerfile b/docker/cross-compilation/aarch64-unknown-linux-gnu/Dockerfile index efa395f267..4b262f7a1a 100644 --- a/docker/cross-compilation/aarch64-unknown-linux-gnu/Dockerfile +++ b/docker/cross-compilation/aarch64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:latest +FROM ubuntu:focal # Install basic environment dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ diff --git a/docker/cross-compilation/arm-unknown-linux-gnueabihf/Dockerfile b/docker/cross-compilation/arm-unknown-linux-gnueabihf/Dockerfile index b633f8a4f5..f513de2aa1 100644 --- a/docker/cross-compilation/arm-unknown-linux-gnueabihf/Dockerfile +++ b/docker/cross-compilation/arm-unknown-linux-gnueabihf/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:latest +FROM ubuntu:focal # Install basic environment dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ diff --git a/docker/cross-compilation/armv7-unknown-linux-gnueabihf/Dockerfile b/docker/cross-compilation/armv7-unknown-linux-gnueabihf/Dockerfile index af14a17e26..4f344bfecb 100644 --- a/docker/cross-compilation/armv7-unknown-linux-gnueabihf/Dockerfile +++ b/docker/cross-compilation/armv7-unknown-linux-gnueabihf/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:latest +FROM ubuntu:focal # Install basic environment dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ diff --git a/docker/cross-compilation/x86_64-unknown-linux-gnu/Dockerfile b/docker/cross-compilation/x86_64-unknown-linux-gnu/Dockerfile index ec9746b9cc..fc83400fc5 100644 --- a/docker/cross-compilation/x86_64-unknown-linux-gnu/Dockerfile +++ b/docker/cross-compilation/x86_64-unknown-linux-gnu/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:latest +FROM ubuntu:focal # Install basic environment dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ diff --git a/docker/witnet-rust/Dockerfile b/docker/witnet-rust/Dockerfile index e4d918bfb5..0033645bf1 100644 --- a/docker/witnet-rust/Dockerfile +++ b/docker/witnet-rust/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$TARGETPLATFORM ubuntu:focal +FROM --platform=$TARGETPLATFORM ubuntu:jammy # Install basic environment dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ diff --git a/docker/witnet-rust/downloader.sh b/docker/witnet-rust/downloader.sh index 5e30371822..2e614a321e 100755 --- a/docker/witnet-rust/downloader.sh +++ b/docker/witnet-rust/downloader.sh @@ -16,6 +16,10 @@ if [[ "$TRIPLET" == *"linux"* ]]; then TRIPLET=${TRIPLET/pc/unknown} fi +if [[ "$TRIPLET" == *"arm-"* ]]; then + TRIPLET=${TRIPLET/arm/armv7} +fi + URL="https://github.com/witnet/witnet-rust/releases/download/$VERSION/witnet-$VERSION-$TRIPLET.tar.gz" FILENAME="$VERSION.tar.gz"