Skip to content

Commit

Permalink
fix(cd): target specific ubuntu versions, ensure execution permission…
Browse files Browse the repository at this point in the history
…s and bundle witnet.toml
  • Loading branch information
aesedepece committed Oct 18, 2022
1 parent 376612c commit 9781266
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 7 deletions.
9 changes: 7 additions & 2 deletions .github/actions/download-releases/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ runs:
- shell: bash
run: |
curl "https://raw.githubusercontent.com/witnet/genesis_block/master/latest/genesis_block.json" -o genesis_block.json
cp witnet.toml release/
cp genesis_block.json release/
cp witnet.toml release/
# Download & Hash Releases
# Macos
Expand All @@ -24,6 +24,7 @@ runs:
- shell: bash
run: |
cp genesis_block.json ./all-releases/macos/
cp witnet.toml ./all-releases/macos/
cp all-releases/macos/witnet_toolkit release/witnet_toolkit-x86_64-apple-darwin
# Windows
Expand All @@ -34,6 +35,7 @@ runs:
- shell: bash
run: |
cp genesis_block.json ./all-releases/windows/
cp witnet.toml ./all-releases/windows/
cp all-releases/windows/witnet_toolkit.exe release/witnet_toolkit-x86_64-pc-windows-msvc.exe
# x86_64
Expand All @@ -44,6 +46,7 @@ runs:
- shell: bash
run: |
cp genesis_block.json ./all-releases/x86_64/
cp witnet.toml ./all-releases/x86_64/
cp all-releases/x86_64/witnet_toolkit release/witnet_toolkit-x86_64-unknown-linux-gnu
# armv7
Expand All @@ -54,6 +57,7 @@ runs:
- shell: bash
run: |
cp genesis_block.json ./all-releases/armv7/
cp witnet.toml ./all-releases/armv7/
cp all-releases/armv7/witnet_toolkit release/witnet_toolkit-armv7-unknown-linux-gnueabihf
# aarch64
Expand All @@ -64,9 +68,10 @@ runs:
- shell: bash
run: |
cp genesis_block.json ./all-releases/aarch64/
cp witnet.toml ./all-releases/aarch64/
cp all-releases/aarch64/witnet_toolkit release/witnet_toolkit-aarch64-unknown-linux-gnu
# Copy gensis_block & witnet.toml
# Copy genesis_block & witnet.toml
- shell: bash
run: |
cp genesis_block.json ./release
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion docker/witnet-rust/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
4 changes: 4 additions & 0 deletions docker/witnet-rust/downloader.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 9781266

Please sign in to comment.