Skip to content

Commit

Permalink
fix runners, i guess it reformatted them too
Browse files Browse the repository at this point in the history
  • Loading branch information
jack60612 committed Jul 10, 2024
1 parent bd166bd commit 47d9fbd
Show file tree
Hide file tree
Showing 4 changed files with 294 additions and 295 deletions.
97 changes: 48 additions & 49 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 @@ -19,67 +18,67 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-12, ubuntu-latest, windows-latest]
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
- name: Run cost checks
run: |
. ./activate
cd tests
./generate-programs.py
./run-programs.py
106 changes: 53 additions & 53 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 @@ -21,63 +21,63 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [[ARM64, Linux]]
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 \
'
- 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 47d9fbd

Please sign in to comment.