Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 26 additions & 0 deletions .github/actionlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
self-hosted-runner:
# Labels of self-hosted runner in array of strings.
labels: ["benchmark", "glue-notify"]

# Configuration variables in array of strings defined in your repository or
# organization. `null` means disabling configuration variables check.
# Empty array means no configuration variable is allowed.
config-variables: null

# Configuration for file paths. The keys are glob patterns to match to file
# paths relative to the repository root. The values are the configurations for
# the file paths. Note that the path separator is always '/'.
# The following configurations are available.
#
# "ignore" is an array of regular expression patterns. Matched error messages
# are ignored. This is similar to the "-ignore" command line option.
paths:
# .github/workflows/**/*.yml:
# ignore: []
# ".github/workflows/*.y*ml":
# ignore: ["string should not be empty", ".* SC2002:.*"]
# ".github/workflows/test-single.yml":
# ignore: [
# # special case here using a variable as a key in the excludes
# 'value .*\$\{\{ inputs.matrix_mode \}\}.* in "exclude" does not match in matrix "python" combinations. possible values are',
# ]
5 changes: 4 additions & 1 deletion .github/workflows/build-crate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ jobs:
matrix:
package:
- name: chia-consensus
env:
# EXAMPLE_ as an example and to appease actionlint
EXAMPLE_LSAN_OPTIONS: detect_leaks=0
- name: chia-bls
- name: clvm-utils
- name: chia-protocol
Expand All @@ -98,4 +101,4 @@ jobs:
env: ${{ matrix.package.env || fromJSON('{}') }}
run: |
cd crates/"${{ matrix.package.name }}"
cargo fuzz list | xargs -I "%" sh -c "cargo +"${{ matrix.toolchain }}" fuzz run % -- -max_total_time=${{ matrix.max_total_time}} || exit 255"
cargo fuzz list | xargs -I "%" sh -c "cargo +'${{ matrix.toolchain }}' fuzz run % -- -max_total_time=${{ matrix.max_total_time}} || exit 255"
3 changes: 3 additions & 0 deletions .github/workflows/build-riscv64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,15 @@ jobs:
run: |
aws s3 ls s3://download.chia.net/simple/chia-rs/ > existing_wheel_list_raw
cat existing_wheel_list_raw
# shellcheck disable=SC2002
cat existing_wheel_list_raw | tr -s ' ' | cut -d ' ' -f 4 > existing_wheel_list

- name: List new wheels
if: env.RELEASE == 'true'
shell: sh
run: |
(cd target/wheels/; ls chia_rs-*.whl) > new_wheel_list
# shellcheck disable=SC2002
cat new_wheel_list | xargs -I % sh -c 'ls -l target/wheels/%'

- name: Choose wheels to upload
Expand All @@ -154,4 +156,5 @@ jobs:
if: env.RELEASE == 'true'
shell: sh
run: |
# shellcheck disable=SC2002
cat upload_wheel_list | xargs -I % sh -c 'aws s3 cp target/wheels/% s3://download.chia.net/simple/chia-rs/'
43 changes: 31 additions & 12 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ jobs:
python -m pip install --upgrade pip
python -m pip install maturin

- name: Build MacOs with maturin on Python ${{ matrix.python }}
- name: Build MacOs with maturin on Python ${{ matrix.python.major-dot-minor }}
if: matrix.os.matrix == 'macos'
env:
MACOSX_DEPLOYMENT_TARGET: "13.0"
run: |
maturin build -i python --release -m wheel/Cargo.toml --features=openssl,pyo3/extension-module

- name: Build Linux with maturin on Python ${{ matrix.python }}
- name: Build Linux with maturin on Python ${{ matrix.python.major-dot-minor }}
if: matrix.os.matrix == 'ubuntu'
run: |
docker run --rm --pull always \
Expand All @@ -178,7 +178,7 @@ jobs:
CC=gcc maturin build --release --manylinux ${{ matrix.python.by-arch[matrix.arch.matrix].manylinux-version }} -m wheel/Cargo.toml --features=openssl,pyo3/extension-module \
'

- name: Build Windows with maturin on Python ${{ matrix.python }}
- name: Build Windows with maturin on Python ${{ matrix.python.major-dot-minor }}
if: matrix.os.matrix == 'windows'
env:
CC: "clang"
Expand Down Expand Up @@ -264,14 +264,14 @@ jobs:
pip install maturin
maturin sdist -m wheel/Cargo.toml
cd target/wheels
dirname=`basename chia_rs*.tar.gz .tar.gz`
echo $dirname
mkdir $dirname
cp -r ../../src/ $dirname/src/
dirname=$(basename chia_rs*.tar.gz .tar.gz)
echo "$dirname"
mkdir "$dirname"
cp -r ../../src/ "$dirname/src/"
gunzip chia_rs*.tar.gz
tar rvf chia_rs*.tar $dirname/src
tar rvf chia_rs*.tar "$dirname/src"
gzip chia_rs*.tar
rm -rf $dirname
rm -rf "$dirname"

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -310,6 +310,23 @@ jobs:
run: |
cargo clippy --workspace --all-features --all-targets

actionlint:
runs-on: ubuntu-latest
permissions:
contents: none
steps:
- uses: actions/checkout@v4

- name: actionlint
run: |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
Comment thread
arvidn marked this conversation as resolved.
echo ==== shellcheck version
shellcheck --version
echo ==== actionlint version
./actionlint --version
echo ==== running actionlint
./actionlint -color -shellcheck shellcheck

unit_tests:
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -332,9 +349,11 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: |
cargo install grcov --locked
echo "RUSTFLAGS=-Cinstrument-coverage" >> "$GITHUB_ENV"
echo "LLVM_PROFILE_FILE=$(pwd)/target/chia_rs-%p-%m.profraw" >> "$GITHUB_ENV"
echo "CARGO_TARGET_DIR=$(pwd)/target" >> "$GITHUB_ENV"
{
echo "RUSTFLAGS=-Cinstrument-coverage"
echo "LLVM_PROFILE_FILE=$(pwd)/target/chia_rs-%p-%m.profraw"
echo "CARGO_TARGET_DIR=$(pwd)/target"
} >> "$GITHUB_ENV"
- name: cargo test (not windows)
if: matrix.os != 'windows-latest'
run: cargo test --workspace --all-features
Expand Down
1 change: 1 addition & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable=SC2002
Loading