Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update github actions versions #2476

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
95f97ee
feat(mining): include data request requiring too many witnesses combi…
drcpu-github Apr 13, 2024
4766037
chore(cargo): format the entire codebase
aesedepece Jun 21, 2024
8d1ad80
fix(stakes): fix mining by a validator with a different withdrawer ad…
drcpu-github May 31, 2024
5c07b73
chore(clippy): minor code refactors to satisfy Clippy
drcpu-github May 31, 2024
eb9dc4a
fix(tests): fix a bunch of tests after the wit/2 integation
drcpu-github Jun 1, 2024
26019e1
chore: tidy up codebase, specially function signatures and tests
aesedepece Jun 24, 2024
7caba26
feat(data_structures): allow comparing protocol versions
aesedepece Jun 26, 2024
45ff41f
fix(node): recover backwards compatibility with V1_7 mainnet
aesedepece Jun 26, 2024
c1b696a
fix(staking): implement serde manually to preserve `Rc` properties
aesedepece Jun 27, 2024
3b0dd00
feat(staking): discard nanoWits for power computation
aesedepece Jul 2, 2024
87b0213
fix(validations): first compare staker power to decide which block pr…
drcpu-github Jun 14, 2024
bcf725e
feature(mining): slash validators' power when no valid block was prop…
drcpu-github Jun 14, 2024
5345b33
fix(validations): fix the node mining eligibility criteria
drcpu-github Jun 14, 2024
1da2c4f
fix(mining): make sure the age reset only happens when the previous b…
drcpu-github Jun 14, 2024
1398bba
fix(validations): take change output into account when calculating st…
drcpu-github Jun 16, 2024
061d067
feat(jsonrpc): add stake and unstake transaction hashes plus weights …
drcpu-github Jun 16, 2024
46ee415
feat(mining): add functionality to reward validators whom have mined …
drcpu-github Jun 15, 2024
f034c54
feat(mining): disable mint transactions post wit\2
drcpu-github Jun 16, 2024
bb4e226
feat(validations): validate withdrawer uniqueness for an existing val…
drcpu-github Jun 16, 2024
54e4172
fix(mining): do not include stake transactions in block during V1_7
drcpu-github Jun 21, 2024
0a8869e
feat(staking): discard nanoWits for average epoch computation when ad…
drcpu-github Jul 2, 2024
b0dcc2a
chore: satisfy clippy lints
aesedepece Jul 16, 2024
7077e79
feature(data_structures): switch block time when v2.0 activates
drcpu-github Jun 21, 2024
f814ec2
chore: format entire codebase
aesedepece Jul 16, 2024
c680dc3
fix(wallet): solve backwards-compatibility of wallet component
aesedepece Jul 23, 2024
98070fc
chore: update all action versions
aeweda Jul 10, 2024
3e4a66e
chore: update action versions and stop using actions-rs
Tommytrg Jul 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/actions/build-helper/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ runs:
run: docker build -t witnet-rust/${{ inputs.imagename }}:latest -f ./docker/cross-compilation/${{ inputs.imagename }}/Dockerfile ./docker/cross-compilation/

- name: Upload image
uses: ishworkh/docker-image-artifact-upload@v1
uses: ishworkh/container-image-artifact-upload@v1.1.1
with:
image: "witnet-rust/${{ inputs.imagename }}:latest"
2 changes: 1 addition & 1 deletion .github/actions/build-linux/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ runs:
steps:
# Download Helper Image built in the previous jobs
- name: Downloading helper Image
uses: ishworkh/docker-image-artifact-download@v1
uses: ishworkh/container-image-artifact-upload@v1.1.1
with:
image: "witnet-rust/${{ inputs.target }}:latest"

Expand Down
10 changes: 5 additions & 5 deletions .github/actions/download-releases/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ runs:

# Download & Hash Releases
# Macos
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: macos-release
path: all-releases/macos/
Expand All @@ -29,7 +29,7 @@ runs:
mv all-releases/macos/witnet_toolkit release/witnet_toolkit-x86_64-apple-darwin

# Windows
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: windows-release
path: all-releases/windows/
Expand All @@ -41,7 +41,7 @@ runs:
mv all-releases/windows/witnet_toolkit.exe release/witnet_toolkit-x86_64-pc-windows-msvc.exe

# x86_64
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: x86_64-release
path: all-releases/x86_64/
Expand All @@ -53,7 +53,7 @@ runs:
mv all-releases/x86_64/witnet_toolkit release/witnet_toolkit-x86_64-unknown-linux-gnu

# armv7
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: armv7-release
path: all-releases/armv7/
Expand All @@ -65,7 +65,7 @@ runs:
mv all-releases/armv7/witnet_toolkit release/witnet_toolkit-armv7-unknown-linux-gnueabihf

# aarch64
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: aarch64-release
path: all-releases/aarch64/
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/bridge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,25 @@ on:
required: false
default: true

env:
CARGO_TERM_COLOR: always

jobs:
Bridge:
runs-on: ubuntu-latest
environment: tags
if: ${{ github.event.workflow_run.conclusion == 'success' || inputs.force }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Protobuf
run: |
sudo apt install -y protobuf-compiler
protoc --version

- name: Show Rust toolchain
run: rustup show

- name: Build witnet-centralized-ethereum-bridge
run: |
cargo build -p witnet-centralized-ethereum-bridge --release
Expand All @@ -44,7 +50,7 @@ jobs:
docker image ls

- name: Login to Docker hub Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
47 changes: 27 additions & 20 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- '*'

env:
CARGO_TERM_COLOR: always

jobs:
#?####################################################################################################?#
#? ?#
Expand All @@ -14,7 +17,7 @@ jobs:
aarch64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/build-helper
name: Building Docker Image
with:
Expand All @@ -23,7 +26,7 @@ jobs:
armv7:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/build-helper
name: Building Docker Image
with:
Expand All @@ -32,7 +35,7 @@ jobs:
x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ./.github/actions/build-helper
name: Building Docker Image
with:
Expand All @@ -59,7 +62,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout Repo
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Download Images & Build Binary
- uses: ./.github/actions/build-linux
Expand All @@ -68,7 +71,7 @@ jobs:
target: aarch64-unknown-linux-gnu

# Upload Build Releases
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: aarch64-release
path: |
Expand All @@ -80,7 +83,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout Repo
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Download Images & Build Binary
- uses: ./.github/actions/build-linux
Expand All @@ -89,7 +92,7 @@ jobs:
target: armv7-unknown-linux-gnueabihf

# Upload Build Releases
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: armv7-release
path: |
Expand All @@ -101,7 +104,7 @@ jobs:
runs-on: ubuntu-latest
steps:
# Checkout Repo
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Download Images & Build Binary
- uses: ./.github/actions/build-linux
Expand All @@ -110,7 +113,7 @@ jobs:
target: x86_64-unknown-linux-gnu

# Upload Build Releases
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: x86_64-release
path: |
Expand All @@ -123,18 +126,21 @@ jobs:
runs-on: macos-latest
steps:
# Checkout Repo
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Install Protobuf
- name: Install Protobuf
run: brew install protobuf

- name: Show Rust toolchain
run: rustup show

# MacOS Build
- name: Building Macos Binary
run: MACOSX_DEPLOYMENT_TARGET=10.14 OPENSSL_STATIC=1 OPENSSL_DIR="/usr/local/opt/openssl" cargo build --release -p witnet -p witnet_toolkit

# Upload Build Releases
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: macos-release
path: |
Expand All @@ -147,7 +153,7 @@ jobs:
runs-on: windows-latest
steps:
# Checkout Repo
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Install Protobuf
- name: Install Protobuf
Expand All @@ -163,6 +169,7 @@ jobs:
vcpkg.exe install openssl:x64-windows-static
vcpkg.exe integrate install


# Windows Build
- name: Build Windows
run: |
Expand All @@ -175,7 +182,7 @@ jobs:
run: LDD.exe target\release\witnet.exe | Select-String -Pattern "ssl"

# Upload Build Releases
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: windows-release
path: |
Expand All @@ -194,7 +201,7 @@ jobs:
environment: tags
steps:
# Checkout Repo
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Download Releases
- uses: ./.github/actions/download-releases
Expand All @@ -203,7 +210,7 @@ jobs:
# Import GPG Key
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
Expand All @@ -223,7 +230,7 @@ jobs:
gpg --output SHA256SUMS.asc --default-key info@witnet.foundation --detach-sig --clearsign SHA256SUMS && rm SHA256SUMS

# Artifact Final Release Files
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: final-release
path: release/
Expand All @@ -235,10 +242,10 @@ jobs:
contents: write
steps:
# Checkout Repo
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Download Release Files
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: final-release
path: release/
Expand All @@ -262,10 +269,10 @@ jobs:
environment: tags
steps:
# Checkout Repo
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Login to Docker Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/midnight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@ on:
schedule:
- cron: '0 0 * * *'

env:
CARGO_TERM_COLOR: always

jobs:
deps_audit:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Cargo dependencies security audit
uses: actions-rs/audit-check@v1
uses: rustsec/audit-check@v1.4.1
with:
token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -22,13 +25,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Install Just command runner
uses: taiki-e/install-action@just

- name: Install environment dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get install -y g++-9 cmake libcurl4-openssl-dev libelf-dev libdw-dev cmake gcc binutils-dev protobuf-compiler librocksdb-dev
just || curl -LSfs https://japaric.github.io/trust/install.sh | sh -s -- --git casey/just --target x86_64-unknown-linux-musl --to ~/.cargo/bin

- name: Load persistent storage
run: |
Expand Down
34 changes: 14 additions & 20 deletions .github/workflows/push.yml → .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Check on every push
name: Check on every pull request

on: [push, pull_request]
on: [pull_request]

env:
CARGO_TERM_COLOR: always

jobs:
build_ubuntu:
Expand All @@ -24,7 +27,7 @@ jobs:
LD_LIBRARY_PATH: /usr/local/lib

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

# Ensure some subcrate versions match that of the main crate
- uses: ./.github/actions/versions-match
Expand All @@ -48,17 +51,14 @@ jobs:
with:
subcrate: bridges/centralized-ethereum

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
components: rustfmt, clippy
- name: Show Rust toolchain
run: rustup show

- name: Install Just command runner
uses: taiki-e/install-action@just

- name: Formatter
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: just fmt

- name: Install compilation system dependencies
run: |
Expand All @@ -74,16 +74,10 @@ jobs:
sudo make install-shared

- name: Clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --all-targets --all-features -- ${{ env.CLIPPY_LINTS }} -A clippy::many-single-char-names
run: just clippy

- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all --verbose
run: cargo test --all --verbose

# This is used to ensure that Cargo.lock is up to date
- name: Check for unstaged files
Expand Down
Loading
Loading