Skip to content

Commit

Permalink
Add requirements.txt (#918)
Browse files Browse the repository at this point in the history
* Add requirements file

* Use requirements file in Makefile

* Use requirements file in install scripts

* Use requirements file in workflows

* Debug CI

* Fix syntax

* Debug CI

* remov debug ci

* use makefile target

* Revert "use makefile target"

This reverts commit b13d2e5.

* Try absolute path for requirement file

* Revert "Try absolute path for requirement file"

This reverts commit 9566f4b.

* Try stuff

* Reorder steps

* Reorder steps

* Delay change for first job of iai benchmark
  • Loading branch information
fmoletta authored Mar 27, 2023
1 parent 6e5340a commit 16e2da5
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
python-version: '3.9'
- name: Install test dependencies
run: pip install ecdsa fastecdsa sympy typeguard==2.13.0 cairo-lang==0.10.3
run: pip install -r requirements.txt
- name: Run benchmark
run: make benchmark-action
- name: Store benchmark result
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bench_pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
python-version: '3.9'
- name: Install test dependencies
run: pip install ecdsa fastecdsa sympy typeguard==2.13.0 cairo-lang==0.10.3
run: pip install -r requirements.txt
- name: Run benchmark
run: make benchmark-action
- name: Store benchmark result
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/iai_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
python-version: '3.9'
- name: Install test dependencies
run: |
pip install ecdsa fastecdsa sympy typeguard==2.13.0 cairo-lang==0.10.3
pip install -r requirements.txt
sudo apt update
sudo apt install -y valgrind
- uses: actions/checkout@v3
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/iai_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.sha }}
- name: Install test dependencies
run: |
pip install ecdsa fastecdsa sympy typeguard==2.13.0 cairo-lang==0.10.3
sudo apt update
sudo apt install -y valgrind
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.sha }}
- name: Initialize IAI cache for ${{ github.event.pull_request.base.sha }}
uses: actions/cache@v3
id: cache-iai-results
Expand Down Expand Up @@ -53,12 +54,13 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Checkout
uses: actions/checkout@v3
- name: Install test dependencies
run: |
pip install ecdsa fastecdsa sympy typeguard==2.13.0 cairo-lang==0.10.3
pip install -r requirements.txt
sudo apt update
sudo apt install -y valgrind
- uses: actions/checkout@v3
- name: Initialize IAI cache for ${{ github.event.pull_request.base.sha }}
uses: actions/cache@v3
id: cache-iai-results
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ jobs:

- name: Set up cargo cache
uses: Swatinem/rust-cache@v2

- name: Install test dependencies
run: pip install ecdsa fastecdsa sympy typeguard==2.13.0 cairo-lang==0.10.3
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 0
- name: Install test dependencies
run: pip install -r requirements.txt
- name: Format
run: cargo fmt --all -- --check
- name: Build
Expand All @@ -63,7 +63,7 @@ jobs:
- name: Restore timestamps
uses: chetan/git-restore-mtime-action@v1
- name: Install dependencies
run: pip install ecdsa fastecdsa sympy typeguard==2.13.0 cairo-lang==0.10.3
run: pip install -r requirements.txt
- name: Run tests
run: make -j test
- name: Run tests no_std
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ deps:
cargo install --version 0.5.9 cargo-llvm-cov
pyenv install pypy3.7-7.3.9
pyenv global pypy3.7-7.3.9
pip install typeguard==2.13.0 cairo-lang==0.10.3
pip install -r requirements.txt
pyenv install 3.7.12
pyenv global 3.7.12
pip install typeguard==2.13.0 cairo-lang==0.10.3
pip install -r requirements.txt

$(RELBIN):
cargo build --release
Expand Down
7 changes: 2 additions & 5 deletions install-scripts/install-debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ pyenv local 3.9
python3.9 -m venv ~/cairo_venv
source ~/cairo_venv/bin/activate

# Install cairo dependencies
# Install cairo & its dependencies
apt install -y libgmp3-dev
pip3 install ecdsa fastecdsa sympy

# Install cairo
pip3 install cairo-lang
pip3 install -r requirements.txt

7 changes: 2 additions & 5 deletions install-scripts/install-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ pyenv local 3
python3 -m venv ~/cairo_venv
source ~/cairo_venv/bin/activate

# Install cairo dependencies
pip3 install ecdsa fastecdsa sympy

# Install cairo
pip3 install cairo-lang
# Install cairo & its dependencies
pip3 install -r requirements.txt

8 changes: 2 additions & 6 deletions install-scripts/install-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ pyenv local 3.9.16
python3.9 -m venv ~/cairo_venv
source ~/cairo_venv/bin/activate

# Install cairo dependencies
# Install cairo & its dependencies
sudo apt install -y libgmp3-dev
pip3 install ecdsa fastecdsa sympy

# Install cairo
pip3 install cairo-lang

pip3 install -r requirements.txt
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ecdsa==0.18.0
fastecdsa==2.2.3
sympy==1.11.1
typeguard==2.13.3
cairo-lang==0.10.3

0 comments on commit 16e2da5

Please sign in to comment.