Skip to content

Commit

Permalink
Merge branch 'main' into merkle_blob
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Oct 1, 2024
2 parents 40bc208 + f23eaeb commit a14033a
Show file tree
Hide file tree
Showing 89 changed files with 2,460 additions and 1,788 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/audit-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
branches:
- "**"

concurrency:
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }}
cancel-in-progress: true

jobs:
security_audit:
runs-on: ubuntu-latest
Expand Down
29 changes: 28 additions & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
branches:
- "**"

concurrency:
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }}
cancel-in-progress: true

jobs:
tests:
name: Unit Tests
Expand All @@ -20,6 +24,9 @@ jobs:
os: [macos-latest, ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]

env:
stubtest_args: ${{ matrix.python-version == '3.11' && '--allowlist wheel/stubtest.allowlist.3-11-plus' || ''}}

steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -58,7 +65,27 @@ jobs:
- name: python mypy
run: |
mypy --ignore-missing-imports tests
mypy tests
- name: python mypy stubtest
shell: bash
run: |
FAILURE=0
echo "::group::concise"
if ! stubtest ${{ env.stubtest_args }} --allowlist wheel/stubtest.allowlist --concise chia_rs
then
FAILURE=1
fi
echo "::endgroup::"
echo "::group::complete"
if ! stubtest ${{ env.stubtest_args }} --allowlist wheel/stubtest.allowlist chia_rs
then
FAILURE=1
fi
echo "::endgroup::"
exit ${FAILURE}
- name: python black
run: |
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/build-crate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
branches:
- "**"

concurrency:
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }}
cancel-in-progress: true

jobs:
build_crate:
name: Build crate
Expand All @@ -28,6 +32,12 @@ jobs:
- name: Clippy
run: cargo clippy --workspace --all-features --all-targets

- name: Install cargo-machete
run: cargo install cargo-machete

- name: Unused dependencies
run: cargo machete

- name: Tests (debug)
run: cargo test --workspace --all-features

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
branches:
- "**"

concurrency:
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }}
cancel-in-progress: true

jobs:
build_npm:
name: Build npm
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/build-riscv64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
branches:
- "**"

concurrency:
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }}
cancel-in-progress: true

permissions:
id-token: write
contents: read
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ on:
- "**"

concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }}
cancel-in-progress: true

permissions:
Expand All @@ -31,7 +30,7 @@ jobs:
matrix: macos
runs-on:
arm: [macOS, ARM64]
intel: [macos-12]
intel: [macos-13]
- name: Ubuntu
matrix: ubuntu
runs-on:
Expand Down Expand Up @@ -149,7 +148,7 @@ jobs:
- name: Build MacOs with maturin on Python ${{ matrix.python }}
if: matrix.os.matrix == 'macos'
env:
MACOSX_DEPLOYMENT_TARGET: "11.0"
MACOSX_DEPLOYMENT_TARGET: "13.0"
run: |
python${{ matrix.python.major-dot-minor }} -m venv venv
. venv/bin/activate
Expand Down Expand Up @@ -190,8 +189,15 @@ jobs:
directories: ${{ steps.create-venv.outputs.activate-venv-directories }}

- name: Install chia_rs wheel
shell: bash
run: |
pip install --no-index --find-links target/wheels/ chia_rs
TMP_DEST=$(mktemp -d)
pip download --no-index --no-deps --only-binary :all: --find-links target/wheels/ --dest "${TMP_DEST}" chia_rs
echo ====
ls -l "${TMP_DEST}"
echo ====
pip install "${TMP_DEST}"/*
rm -rf "${TMP_DEST}"
- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
branches:
- "**"

concurrency:
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }}
cancel-in-progress: true

jobs:
prettier:
name: Prettier
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ repos:
entry: cargo clippy --workspace --all-features --all-targets
language: system
pass_filenames: false
- id: machete
name: machete
description: run cargo machete on the workspace
entry: cargo machete
language: system
pass_filenames: false
- id: tests
name: run tests
description: run cargo test on the workspace
Expand Down
Loading

0 comments on commit a14033a

Please sign in to comment.