Skip to content

Commit 9781266

Browse files
committed
fix(cd): target specific ubuntu versions, ensure execution permissions and bundle witnet.toml
1 parent 376612c commit 9781266

File tree

8 files changed

+20
-7
lines changed

8 files changed

+20
-7
lines changed

.github/actions/download-releases/action.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ runs:
1212
- shell: bash
1313
run: |
1414
curl "https://raw.githubusercontent.com/witnet/genesis_block/master/latest/genesis_block.json" -o genesis_block.json
15-
cp witnet.toml release/
1615
cp genesis_block.json release/
16+
cp witnet.toml release/
1717
1818
# Download & Hash Releases
1919
# Macos
@@ -24,6 +24,7 @@ runs:
2424
- shell: bash
2525
run: |
2626
cp genesis_block.json ./all-releases/macos/
27+
cp witnet.toml ./all-releases/macos/
2728
cp all-releases/macos/witnet_toolkit release/witnet_toolkit-x86_64-apple-darwin
2829
2930
# Windows
@@ -34,6 +35,7 @@ runs:
3435
- shell: bash
3536
run: |
3637
cp genesis_block.json ./all-releases/windows/
38+
cp witnet.toml ./all-releases/windows/
3739
cp all-releases/windows/witnet_toolkit.exe release/witnet_toolkit-x86_64-pc-windows-msvc.exe
3840
3941
# x86_64
@@ -44,6 +46,7 @@ runs:
4446
- shell: bash
4547
run: |
4648
cp genesis_block.json ./all-releases/x86_64/
49+
cp witnet.toml ./all-releases/x86_64/
4750
cp all-releases/x86_64/witnet_toolkit release/witnet_toolkit-x86_64-unknown-linux-gnu
4851
4952
# armv7
@@ -54,6 +57,7 @@ runs:
5457
- shell: bash
5558
run: |
5659
cp genesis_block.json ./all-releases/armv7/
60+
cp witnet.toml ./all-releases/armv7/
5761
cp all-releases/armv7/witnet_toolkit release/witnet_toolkit-armv7-unknown-linux-gnueabihf
5862
5963
# aarch64
@@ -64,9 +68,10 @@ runs:
6468
- shell: bash
6569
run: |
6670
cp genesis_block.json ./all-releases/aarch64/
71+
cp witnet.toml ./all-releases/aarch64/
6772
cp all-releases/aarch64/witnet_toolkit release/witnet_toolkit-aarch64-unknown-linux-gnu
6873
69-
# Copy gensis_block & witnet.toml
74+
# Copy genesis_block & witnet.toml
7075
- shell: bash
7176
run: |
7277
cp genesis_block.json ./release

.github/workflows/master.yml

+4
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ jobs:
133133
- name: Building Macos Binary
134134
run: MACOSX_DEPLOYMENT_TARGET=10.12 OPENSSL_STATIC=1 OPENSSL_DIR="/usr/local/opt/openssl" cargo build --release -p witnet -p witnet_toolkit
135135

136+
# Ensure that distributable binary files can be executed
137+
- name: Make binaries executable
138+
run: chmod +x target/release/witnet*
139+
136140
# Upload Build Releases
137141
- uses: actions/upload-artifact@v3
138142
with:

docker/cross-compilation/aarch64-unknown-linux-gnu/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:latest
1+
FROM ubuntu:focal
22

33
# Install basic environment dependencies
44
RUN apt-get update && apt-get install -y --no-install-recommends \

docker/cross-compilation/arm-unknown-linux-gnueabihf/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:latest
1+
FROM ubuntu:focal
22

33
# Install basic environment dependencies
44
RUN apt-get update && apt-get install -y --no-install-recommends \

docker/cross-compilation/armv7-unknown-linux-gnueabihf/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:latest
1+
FROM ubuntu:focal
22

33
# Install basic environment dependencies
44
RUN apt-get update && apt-get install -y --no-install-recommends \

docker/cross-compilation/x86_64-unknown-linux-gnu/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:latest
1+
FROM ubuntu:focal
22

33
# Install basic environment dependencies
44
RUN apt-get update && apt-get install -y --no-install-recommends \

docker/witnet-rust/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=$TARGETPLATFORM ubuntu:focal
1+
FROM --platform=$TARGETPLATFORM ubuntu:jammy
22

33
# Install basic environment dependencies
44
RUN apt-get update && apt-get install -y --no-install-recommends \

docker/witnet-rust/downloader.sh

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ if [[ "$TRIPLET" == *"linux"* ]]; then
1616
TRIPLET=${TRIPLET/pc/unknown}
1717
fi
1818

19+
if [[ "$TRIPLET" == *"arm-"* ]]; then
20+
TRIPLET=${TRIPLET/arm/armv7}
21+
fi
22+
1923
URL="https://github.com/witnet/witnet-rust/releases/download/$VERSION/witnet-$VERSION-$TRIPLET.tar.gz"
2024

2125
FILENAME="$VERSION.tar.gz"

0 commit comments

Comments
 (0)