Skip to content

Commit

Permalink
Merge branch 'development' into update-feature-dan2
Browse files Browse the repository at this point in the history
* development: (93 commits)
  chore: fix build and osp (tari-project#6415)
  chore: refactor key manager names (tari-project#6411)
  fix: panic in from_base58 fn (tari-project#6414)
  fix: branch keys (tari-project#6413)
  chore: remove dependancy on ledger for common types (tari-project#6412)
  feat: count unique keys (tari-project#6401)
  feat!: fix key manager use of keys (tari-project#6407)
  refactor: remove metadata sig and use difference key branch for offset (tari-project#6400)
  feat: update ledger instructions (tari-project#6406)
  feat: add file-based input and output to faucet commands (tari-project#6405)
  chore: new release v1.0.0-pre.16 (tari-project#6404)
  feat: simplify leader sig generation (tari-project#6399)
  ci(fix): include macOS universal assets in release (tari-project#6402)
  fix: script dependance on party order (tari-project#6398)
  fix: claim n of m faucet (tari-project#6389)
  feat: add ffi features (tari-project#6390)
  chore: fix unwraps in memory key manager (tari-project#6396)
  docs: update hasher documentation (tari-project#6392)
  chore: fix ci (tari-project#6391)
  feat(miner): add SHA P2Pool mining related configuration and changes (tari-project#6370)
  ...
  • Loading branch information
sdbondi committed Jul 22, 2024
2 parents 7d480c5 + 54bccd7 commit b07affd
Show file tree
Hide file tree
Showing 505 changed files with 16,876 additions and 7,139 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
{
"name": "linux-x86_64",
"runs-on": "ubuntu-20.04",
"rust": "nightly-2024-02-04",
"rust": "nightly-2024-07-07",
"target": "x86_64-unknown-linux-gnu",
"cross": false
"cross": false,
"build_metric": true
},
{
"name": "linux-arm64",
"runs-on": "ubuntu-latest",
"rust": "stable",
"target": "aarch64-unknown-linux-gnu",
"cross": true,
"flags": "--workspace --exclude minotari_mining_helper_ffi --exclude tari_integration_tests"
"flags": "--workspace --exclude minotari_mining_helper_ffi --exclude tari_integration_tests",
"build_metric": true
},
{
"name": "linux-riscv64",
Expand All @@ -21,12 +23,12 @@
"target": "riscv64gc-unknown-linux-gnu",
"cross": true,
"flags": "--workspace --exclude minotari_mining_helper_ffi --exclude tari_integration_tests",
"build_enabled": false,
"best-effort": true
"build_enabled": true,
"best_effort": true
},
{
"name": "macos-x86_64",
"runs-on": "macos-11",
"runs-on": "macos-12",
"rust": "stable",
"target": "x86_64-apple-darwin",
"cross": false,
Expand Down

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion .github/workflows/build_dockers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ name: Build docker images
- xmrig

env:
toolchain_default: nightly-2024-02-04
toolchain_default: nightly-2024-07-07

concurrency:
# https://docs.github.com/en/actions/examples/using-concurrency-expressions-and-a-test-matrix
Expand Down Expand Up @@ -88,6 +88,12 @@ jobs:
echo "tag_alias=latest" >> $GITHUB_OUTPUT
echo "build_items=all" >> $GITHUB_OUTPUT
fi
if [[ "${{ github.ref }}" =~ ^refs/heads/build-dockers-* ]] || [[ "${{ github.ref }}" =~ ^refs/heads/build-all-* ]] ; then
echo "Branch Build - limited dual arch"
echo "platforms=linux/arm64, linux/amd64" >> $GITHUB_OUTPUT
echo "tag_alias=latest-weekly" >> $GITHUB_OUTPUT
echo "build_items=minotari_all" >> $GITHUB_OUTPUT
fi
if [ "${{ github.event_name }}" == "workflow_dispatch" ] ; then
echo "Manual Build - selective"
echo "platforms=${{ github.event.inputs.platforms }}" >> $GITHUB_OUTPUT
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_dockers_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ name: Build docker images - workflow_call/on-demand
toolchain:
type: string
description: 'Rust toolchain'
default: nightly-2024-02-04
default: nightly-2024-07-07
arch:
type: string
default: x86-64
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:

- name: Docker image build and push
id: docker_build
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./tari/
file: ./tari-launchpad/docker_rig/${{ env.DOCKERFILE }}.Dockerfile
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/build_libffis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ jobs:
- name: Install macOS dependencies
if: startsWith(runner.os,'macOS')
run: |
brew install openssl cmake coreutils automake autoconf protobuf
# openssl and cmake already installed
brew install coreutils automake autoconf protobuf
rustup target add ${{ matrix.builds.target }}
- name: Setup Rust toolchain
Expand All @@ -171,7 +172,8 @@ jobs:
if: ${{ matrix.builds.cross }}
shell: bash
run: |
cargo install cross
#cargo install cross
cargo install cross --git https://github.com/cross-rs/cross
echo "CARGO=cross" >> $GITHUB_ENV
- name: Install rust target/toolchain for native/local cross-compile builds
Expand Down Expand Up @@ -247,9 +249,8 @@ jobs:
- name: Download iOS libffiss for ${{ matrix.libffis }}
uses: actions/download-artifact@v4
with:
# wildcard downloads not supported yet ( minotari_*_ffi-ios-* )
# name: ${{ matrix.libffis }}-ios
path: libffiss
pattern: lib${{ matrix.libffis }}-ios-*

- name: Verify checksums
shell: bash
Expand Down Expand Up @@ -362,6 +363,9 @@ jobs:
runs-on: ubuntu-latest
needs: [matrix-prep, builds, ios_assemble]

permissions:
contents: write

steps:
- name: Download all ffi libraries
uses: actions/download-artifact@v4
Expand Down
55 changes: 46 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: CI

'on':
workflow_dispatch:
push:
branches:
- "ci-*"
pull_request:
types:
- opened
Expand All @@ -11,22 +14,25 @@ name: CI
merge_group:

env:
toolchain: nightly-2024-02-04
toolchain: nightly-2024-07-07
CARGO_HTTP_MULTIPLEXING: false
CARGO_TERM_COLOR: always
CARGO_UNSTABLE_SPARSE_REGISTRY: true
CARGO_INCREMENTAL: 0
PROTOC: protoc
TERM: unknown
## Must be a JSon string
TS_FEATURES: '["default","safe","grpc","ledger","libtor","metrics","miner_input"]'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# https://docs.github.com/en/actions/examples/using-concurrency-expressions-and-a-test-matrix
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/v') || github.ref != 'refs/heads/development' || github.ref != 'refs/heads/nextnet' || github.ref != 'refs/heads/stagenet' }}

jobs:
clippy:
name: clippy
runs-on: [ubuntu-20.04]
runs-on: [ubuntu-latest]
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -39,7 +45,11 @@ jobs:
run: |
sudo apt-get update
sudo bash scripts/install_ubuntu_dependencies.sh
- name: Cache cargo files and outputs
if: startsWith(runner.environment,'github-hosted')
uses: Swatinem/rust-cache@v2
- name: caching (nightly)
if: startsWith(runner.environment,'self-hosted')
# Don't use rust-cache.
# Rust-cache disables a key feature of actions/cache: restoreKeys.
# Without restore keys, we lose the ability to get partial matches on caches, and end
Expand All @@ -64,10 +74,11 @@ jobs:
run: cargo install cargo-lints
- name: Clippy check (with lints)
run: cargo lints clippy --all-targets --all-features

machete:
# Checks for unused dependencies.
name: machete
runs-on: [ubuntu-20.04]
runs-on: [ubuntu-latest]
steps:
- name: checkout
uses: actions/checkout@v4
Expand All @@ -80,7 +91,11 @@ jobs:
run: |
sudo apt-get update
sudo bash scripts/install_ubuntu_dependencies.sh
- name: Cache cargo files and outputs
if: startsWith(runner.environment,'github-hosted')
uses: Swatinem/rust-cache@v2
- name: caching (machete)
if: startsWith(runner.environment,'self-hosted')
# Don't use rust-cache.
# Rust-cache disables a key feature of actions/cache: restoreKeys.
# Without restore keys, we lose the ability to get partial matches on caches, and end
Expand All @@ -102,6 +117,7 @@ jobs:
run: |
cargo install cargo-machete
cargo machete
build-stable:
# Runs cargo check with stable toolchain to determine whether the codebase is likely to build
# on stable Rust.
Expand All @@ -110,7 +126,11 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v4
- name: Cache cargo files and outputs
if: startsWith(runner.environment,'github-hosted')
uses: Swatinem/rust-cache@v2
- name: caching (stable)
if: startsWith(runner.environment,'self-hosted')
# Don't use rust-cache.
# Rust-cache disables a key feature of actions/cache: restoreKeys.
# Without restore keys, we lose the ability to get partial matches on caches, and end
Expand Down Expand Up @@ -144,10 +164,21 @@ jobs:
run: rustup show
- name: cargo check
run: cargo check --release --all-targets --workspace --exclude tari_integration_tests --locked
- name: cargo check individual features
shell: bash
run: |
FEATURES_ARRAY=( $(echo ${TS_FEATURES} | jq --raw-output '.[]' | awk '{ print $1 }') )
for FEATURE_TEST in "${FEATURES_ARRAY[@]}"; do
echo "Testing for feature ${FEATURE_TEST} ..."
cargo check --release --all-targets \
--features ${FEATURE_TEST} \
--workspace --exclude tari_integration_tests --locked
done
- name: cargo check wallet ffi separately
run: cargo check --release --package minotari_wallet_ffi --locked
- name: cargo check chat ffi separately
run: cargo check --release --package minotari_chat_ffi --locked

licenses:
name: file licenses
runs-on: [ubuntu-20.04]
Expand All @@ -156,11 +187,13 @@ jobs:
uses: actions/checkout@v4
- name: install ripgrep
run: |
wget https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep_13.0.0_amd64.deb
sudo dpkg -i ripgrep_13.0.0_amd64.deb
#wget https://github.com/BurntSushi/ripgrep/releases/download/14.1.0/ripgrep_14.1.0-1_amd64.deb.sha256
wget https://github.com/BurntSushi/ripgrep/releases/download/14.1.0/ripgrep_14.1.0-1_amd64.deb
sudo dpkg -i ripgrep_14.1.0-1_amd64.deb
rg --version || exit 1
- name: run the license check
run: ./scripts/file_license_check.sh

test:
name: test
runs-on: [self-hosted, ubuntu-high-cpu]
Expand Down Expand Up @@ -189,7 +222,11 @@ jobs:
run: |
sudo apt-get update
sudo bash scripts/install_ubuntu_dependencies.sh
- name: Cache cargo files and outputs
if: startsWith(runner.environment,'github-hosted')
uses: Swatinem/rust-cache@v2
- name: caching (nightly)
if: startsWith(runner.environment,'self-hosted')
# Don't use rust-cache.
# Rust-cache disables a key feature of actions/cache: restoreKeys.
# Without restore keys, we lose the ability to get partial matches on caches, and end
Expand Down Expand Up @@ -224,7 +261,7 @@ jobs:
# Allows other workflows to know the PR number
artifacts:
name: pr_2_artifact
runs-on: [ubuntu-20.04]
runs-on: [ubuntu-latest]
steps:
- name: Save the PR number in an artifact
shell: bash
Expand All @@ -241,7 +278,7 @@ jobs:
# needed for test results
event_file:
name: "Upload Event File for Test Results"
runs-on: ubuntu-latest
runs-on: [ubuntu-latest]
steps:
- name: Upload
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ name: Source Coverage
- ci-coverage-*

env:
toolchain: nightly-2024-02-04
toolchain: nightly-2024-07-07

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ name: Integration tests
type: string

env:
toolchain: nightly-2024-02-04
toolchain: nightly-2024-07-07

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
Loading

0 comments on commit b07affd

Please sign in to comment.