Skip to content

Commit

Permalink
Apply prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigidity committed Jul 11, 2024
1 parent 0eea3e1 commit 1d44396
Show file tree
Hide file tree
Showing 18 changed files with 601 additions and 618 deletions.
48 changes: 24 additions & 24 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,65 +3,65 @@

version: 2
updates:
- package-ecosystem: "gomod"
- package-ecosystem: 'gomod'
directory: /
schedule:
interval: "weekly"
day: "tuesday"
interval: 'weekly'
day: 'tuesday'
open-pull-requests-limit: 10
labels:
- dependencies
- go
- "Changed"
reviewers: ["cmmarslender", "starttoaster"]
- 'Changed'
reviewers: ['cmmarslender', 'starttoaster']
groups:
global:
patterns:
- "*"
- '*'

- package-ecosystem: "pip"
- package-ecosystem: 'pip'
directory: /
schedule:
interval: "weekly"
day: "tuesday"
interval: 'weekly'
day: 'tuesday'
open-pull-requests-limit: 10
labels:
- dependencies
- python
- "Changed"
reviewers: ["emlowe", "altendky"]
- 'Changed'
reviewers: ['emlowe', 'altendky']

- package-ecosystem: "github-actions"
- package-ecosystem: 'github-actions'
directory: /
schedule:
interval: "weekly"
day: "tuesday"
interval: 'weekly'
day: 'tuesday'
open-pull-requests-limit: 10
labels:
- dependencies
- github_actions
- "Changed"
reviewers: ["cmmarslender", "Starttoaster", "pmaslana"]
- 'Changed'
reviewers: ['cmmarslender', 'Starttoaster', 'pmaslana']

- package-ecosystem: "npm"
- package-ecosystem: 'npm'
directory: /
schedule:
interval: "weekly"
day: "tuesday"
interval: 'weekly'
day: 'tuesday'
open-pull-requests-limit: 10
labels:
- dependencies
- javascript
- "Changed"
reviewers: ["cmmarslender", "ChiaMineJP"]
- 'Changed'
reviewers: ['cmmarslender', 'ChiaMineJP']

- package-ecosystem: cargo
directory: /
schedule:
interval: "weekly"
day: "tuesday"
interval: 'weekly'
day: 'tuesday'
open-pull-requests-limit: 10
labels:
- dependencies
- rust
- "Changed"
- 'Changed'
6 changes: 3 additions & 3 deletions .github/workflows/audit-check.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Security audit
on:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
runs-on: ubuntu-latest
Expand Down
95 changes: 47 additions & 48 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: Run benchmarks

on:
Expand All @@ -7,7 +6,7 @@ on:
- main
- dev
tags:
- '**'
- '**'
pull_request:
branches:
- '**'
Expand All @@ -22,64 +21,64 @@ jobs:
os: [macos-12, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: chia-network/actions/setup-python@main
name: Install Python 3.9
with:
python-version: 3.9
- uses: chia-network/actions/setup-python@main
name: Install Python 3.9
with:
python-version: 3.9

- name: Update pip
run: |
- name: Update pip
run: |
python -m pip install --upgrade pip
- name: Set up rust
uses: dtolnay/rust-toolchain@stable
- name: Set up rust
uses: dtolnay/rust-toolchain@stable

- name: Run benchmarks
run: cargo bench
- name: Run benchmarks
run: cargo bench

max-cost-checks:
name: Cost checks
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: chia-network/actions/setup-python@main
name: Install Python 3.9
with:
python-version: 3.9
- uses: chia-network/actions/setup-python@main
name: Install Python 3.9
with:
python-version: 3.9

- name: Update pip
run: |
- name: Update pip
run: |
python -m pip install --upgrade pip
- name: Set up rust
uses: dtolnay/rust-toolchain@stable

- name: Install dependencies
run: |
python -m pip install maturin
rustup target add x86_64-unknown-linux-musl
- name: Build
env:
CC: gcc
run: |
python -m venv venv
ln -s venv/bin/activate
. ./activate
python -m pip install colorama
maturin develop -m wheel/Cargo.toml --release --features=openssl
- name: Run cost checks
run: |
. ./activate
cd tests
./generate-programs.py
./run-programs.py
- name: Set up rust
uses: dtolnay/rust-toolchain@stable

- name: Install dependencies
run: |
python -m pip install maturin
rustup target add x86_64-unknown-linux-musl
- name: Build
env:
CC: gcc
run: |
python -m venv venv
ln -s venv/bin/activate
. ./activate
python -m pip install colorama
maturin develop -m wheel/Cargo.toml --release --features=openssl
- name: Run cost checks
run: |
. ./activate
cd tests
./generate-programs.py
./run-programs.py
104 changes: 52 additions & 52 deletions .github/workflows/build-arm64-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
- dev
tags:
- '**'
- '**'
pull_request:
branches:
- '**'
Expand All @@ -24,60 +24,60 @@ jobs:
os: [[ARM64, Linux]]

steps:
- uses: Chia-Network/actions/clean-workspace@main
- uses: Chia-Network/actions/clean-workspace@main

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Build Python wheels
run: |
docker run --rm \
-v ${{ github.workspace }}:/ws --workdir=/ws \
quay.io/pypa/manylinux_2_28_aarch64 \
bash -exc '\
echo $PATH && \
curl -L https://sh.rustup.rs > rustup-init.sh && \
sh rustup-init.sh -y && \
yum -y install openssl-devel && \
source $HOME/.cargo/env && \
rustup target add aarch64-unknown-linux-musl && \
rm -rf venv && \
export PATH=/opt/python/cp310-cp310/bin/:$PATH && \
export PATH=/opt/python/cp39-cp39/bin/:$PATH && \
export PATH=/opt/python/cp38-cp38/bin/:$PATH && \
/opt/python/cp38-cp38/bin/python -m venv venv && \
if [ ! -f "activate" ]; then ln -s venv/bin/activate; fi && \
. ./activate && \
pip install maturin && \
CC=gcc maturin build -m wheel/Cargo.toml --release --strip --manylinux 2_28 --features=openssl \
'
- name: Build Python wheels
run: |
docker run --rm \
-v ${{ github.workspace }}:/ws --workdir=/ws \
quay.io/pypa/manylinux_2_28_aarch64 \
bash -exc '\
echo $PATH && \
curl -L https://sh.rustup.rs > rustup-init.sh && \
sh rustup-init.sh -y && \
yum -y install openssl-devel && \
source $HOME/.cargo/env && \
rustup target add aarch64-unknown-linux-musl && \
rm -rf venv && \
export PATH=/opt/python/cp310-cp310/bin/:$PATH && \
export PATH=/opt/python/cp39-cp39/bin/:$PATH && \
export PATH=/opt/python/cp38-cp38/bin/:$PATH && \
/opt/python/cp38-cp38/bin/python -m venv venv && \
if [ ! -f "activate" ]; then ln -s venv/bin/activate; fi && \
. ./activate && \
pip install maturin && \
CC=gcc maturin build -m wheel/Cargo.toml --release --strip --manylinux 2_28 --features=openssl \
'
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wheels
path: target/wheels/
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: wheels
path: target/wheels/

- name: Install Twine
run: |
if [ ! -f "venv" ]; then sudo rm -rf venv; fi
sudo apt-get install python3-venv python3-pip -y
python3 -m venv venv
if [ ! -f "activate" ]; then ln -s venv/bin/activate; fi
. ./activate
pip install setuptools_rust
- name: Install Twine
run: |
if [ ! -f "venv" ]; then sudo rm -rf venv; fi
sudo apt-get install python3-venv python3-pip -y
python3 -m venv venv
if [ ! -f "activate" ]; then ln -s venv/bin/activate; fi
. ./activate
pip install setuptools_rust
- name: publish (PyPi)
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: target/wheels/
skip-existing: true
- name: publish (PyPi)
if: startsWith(github.event.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: target/wheels/
skip-existing: true

- name: Clean up AMR64
if: startsWith(matrix.os, 'ARM64')
run: |
rm -rf venv
rm -rf dist
- name: Clean up AMR64
if: startsWith(matrix.os, 'ARM64')
run: |
rm -rf venv
rm -rf dist
Loading

0 comments on commit 1d44396

Please sign in to comment.