Use update ci workflows to use defaults.run.working-directory
This commit is contained in:
parent
64c496f815
commit
4f544e465b
5
.github/workflows/audit.yml
vendored
5
.github/workflows/audit.yml
vendored
@ -12,8 +12,11 @@ jobs:
|
|||||||
|
|
||||||
security_audit:
|
security_audit:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: bdk-ffi
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- uses: actions-rs/audit-check@v1
|
- uses: actions-rs/audit-check@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
75
.github/workflows/build-python-wheels.yaml
vendored
75
.github/workflows/build-python-wheels.yaml
vendored
@ -1,5 +1,5 @@
|
|||||||
name: Build Python wheels
|
name: Build Python wheels
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
paths:
|
paths:
|
||||||
- "bdk-ffi/**"
|
- "bdk-ffi/**"
|
||||||
@ -18,6 +18,9 @@ jobs:
|
|||||||
build-manylinux2014-x86_64-wheel:
|
build-manylinux2014-x86_64-wheel:
|
||||||
name: 'Build Manylinux 2014 x86_64 wheel'
|
name: 'Build Manylinux 2014 x86_64 wheel'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: bdk-python
|
||||||
container:
|
container:
|
||||||
image: quay.io/pypa/manylinux2014_x86_64
|
image: quay.io/pypa/manylinux2014_x86_64
|
||||||
env:
|
env:
|
||||||
@ -42,21 +45,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
- name: install requirements
|
- name: install requirements
|
||||||
run: |
|
run: ${PYBIN}/pip install -r requirements.txt
|
||||||
cd bdk-python
|
|
||||||
${PYBIN}/pip install -r requirements.txt
|
|
||||||
- name: generate bindings
|
- name: generate bindings
|
||||||
run: |
|
run: bash generate.sh
|
||||||
cd bdk-python
|
|
||||||
bash generate.sh
|
|
||||||
- name: build wheel
|
- name: build wheel
|
||||||
run: |
|
run: ${PYBIN}/pip wheel . --no-deps -w /tmp/wheelhouse
|
||||||
cd bdk-python
|
|
||||||
${PYBIN}/pip wheel . --no-deps -w /tmp/wheelhouse
|
|
||||||
- name: repair wheel
|
- name: repair wheel
|
||||||
run: |
|
run: auditwheel repair /tmp/wheelhouse/* --plat "$PLAT" -w /tmp/wheelhouse-repaired
|
||||||
cd bdk-python
|
|
||||||
auditwheel repair /tmp/wheelhouse/* --plat "$PLAT" -w /tmp/wheelhouse-repaired
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: bdkpython-manylinux2014-x86_64-${{ matrix.python }}
|
name: bdkpython-manylinux2014-x86_64-${{ matrix.python }}
|
||||||
@ -65,6 +60,9 @@ jobs:
|
|||||||
build-macos-universal-wheel:
|
build-macos-universal-wheel:
|
||||||
name: 'Build macOS universal wheel'
|
name: 'Build macOS universal wheel'
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: bdk-python
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python:
|
python:
|
||||||
@ -73,30 +71,22 @@ jobs:
|
|||||||
# - '3.9'
|
# - '3.9'
|
||||||
- '3.10'
|
- '3.10'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python }}
|
|
||||||
- run: python3 --version
|
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python }}
|
||||||
|
- run: python3 --version
|
||||||
- run: rustup target add aarch64-apple-darwin
|
- run: rustup target add aarch64-apple-darwin
|
||||||
- run: |
|
- run: pip3 install --user -r requirements.txt
|
||||||
cd bdk-python
|
- run: pip3 install --user wheel
|
||||||
pip3 install --user -r requirements.txt
|
- run: bash generate.sh
|
||||||
- run: |
|
|
||||||
cd bdk-python
|
|
||||||
pip3 install --user wheel
|
|
||||||
- run: |
|
|
||||||
cd bdk-python
|
|
||||||
bash generate.sh
|
|
||||||
- name: build wheel
|
- name: build wheel
|
||||||
env:
|
env:
|
||||||
ARCHFLAGS: "-arch x86_64 -arch arm64"
|
ARCHFLAGS: "-arch x86_64 -arch arm64"
|
||||||
run: |
|
run: python3 setup.py -v bdist_wheel
|
||||||
cd bdk-python
|
|
||||||
python3 setup.py -v bdist_wheel
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: bdkpython-macos-${{ matrix.python }}
|
name: bdkpython-macos-${{ matrix.python }}
|
||||||
@ -105,6 +95,9 @@ jobs:
|
|||||||
build-windows-wheel:
|
build-windows-wheel:
|
||||||
name: 'Build windows wheel'
|
name: 'Build windows wheel'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: bdk-python
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python:
|
python:
|
||||||
@ -113,28 +106,20 @@ jobs:
|
|||||||
# - '3.9'
|
# - '3.9'
|
||||||
- '3.10'
|
- '3.10'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python }}
|
|
||||||
- run: python --version
|
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- run: |
|
- uses: actions/setup-python@v2
|
||||||
cd bdk-python
|
with:
|
||||||
pip install --user -r requirements.txt
|
python-version: ${{ matrix.python }}
|
||||||
- run: |
|
- run: python --version
|
||||||
cd bdk-python
|
- run: pip install --user -r requirements.txt
|
||||||
bash generate.sh
|
- run: bash generate.sh
|
||||||
shell: bash
|
shell: bash
|
||||||
- run: |
|
- run: pip install --user wheel
|
||||||
cd bdk-python
|
|
||||||
pip install --user wheel
|
|
||||||
- name: build wheel
|
- name: build wheel
|
||||||
run: |
|
run: python setup.py -v bdist_wheel
|
||||||
cd bdk-python
|
|
||||||
python setup.py -v bdist_wheel
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: bdkpython-win-${{ matrix.python }}
|
name: bdkpython-win-${{ matrix.python }}
|
||||||
|
22
.github/workflows/cont_integration.yml
vendored
22
.github/workflows/cont_integration.yml
vendored
@ -12,6 +12,9 @@ jobs:
|
|||||||
build-test:
|
build-test:
|
||||||
name: Build and test
|
name: Build and test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: bdk-ffi
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
rust:
|
rust:
|
||||||
@ -41,22 +44,19 @@ jobs:
|
|||||||
- name: Update toolchain
|
- name: Update toolchain
|
||||||
run: rustup update
|
run: rustup update
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: cargo build
|
||||||
cd bdk-ffi
|
|
||||||
cargo build
|
|
||||||
- name: Clippy
|
- name: Clippy
|
||||||
if: ${{ matrix.rust.clippy }}
|
if: ${{ matrix.rust.clippy }}
|
||||||
run: |
|
run: cargo clippy --all-targets -- -D warnings
|
||||||
cd bdk-ffi
|
|
||||||
cargo clippy --all-targets -- -D warnings
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: CLASSPATH=./tests/jna/jna-5.8.0.jar cargo test
|
||||||
cd bdk-ffi
|
|
||||||
CLASSPATH=./tests/jna/jna-5.8.0.jar cargo test
|
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
name: Rust fmt
|
name: Rust fmt
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: bdk-ffi
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@ -69,6 +69,4 @@ jobs:
|
|||||||
- name: Update toolchain
|
- name: Update toolchain
|
||||||
run: rustup update
|
run: rustup update
|
||||||
- name: Check fmt
|
- name: Check fmt
|
||||||
run: |
|
run: cargo fmt --all -- --config format_code_in_doc_comments=true --check
|
||||||
cd bdk-ffi
|
|
||||||
cargo fmt --all -- --config format_code_in_doc_comments=true --check
|
|
||||||
|
80
.github/workflows/publish-python.yaml
vendored
80
.github/workflows/publish-python.yaml
vendored
@ -10,6 +10,9 @@ jobs:
|
|||||||
build-manylinux2014-x86_64-wheel:
|
build-manylinux2014-x86_64-wheel:
|
||||||
name: 'Build Manylinux 2014 x86_64 wheel'
|
name: 'Build Manylinux 2014 x86_64 wheel'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: bdk-python
|
||||||
container:
|
container:
|
||||||
image: quay.io/pypa/manylinux2014_x86_64
|
image: quay.io/pypa/manylinux2014_x86_64
|
||||||
env:
|
env:
|
||||||
@ -34,21 +37,13 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
- name: install requirements
|
- name: install requirements
|
||||||
run: |
|
run: ${PYBIN}/pip install -r requirements.txt
|
||||||
cd bdk-python
|
|
||||||
${PYBIN}/pip install -r requirements.txt
|
|
||||||
- name: generate bindings
|
- name: generate bindings
|
||||||
run: |
|
run: bash generate.sh
|
||||||
cd bdk-python
|
|
||||||
bash generate.sh
|
|
||||||
- name: build wheel
|
- name: build wheel
|
||||||
run: |
|
run: ${PYBIN}/pip wheel . --no-deps -w /tmp/wheelhouse
|
||||||
cd bdk-python
|
|
||||||
${PYBIN}/pip wheel . --no-deps -w /tmp/wheelhouse
|
|
||||||
- name: repair wheel
|
- name: repair wheel
|
||||||
run: |
|
run: auditwheel repair /tmp/wheelhouse/* --plat "$PLAT" -w /tmp/wheelhouse-repaired
|
||||||
cd bdk-python
|
|
||||||
auditwheel repair /tmp/wheelhouse/* --plat "$PLAT" -w /tmp/wheelhouse-repaired
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: bdkpython-manylinux2014-x86_64-${{ matrix.python }}
|
name: bdkpython-manylinux2014-x86_64-${{ matrix.python }}
|
||||||
@ -57,6 +52,9 @@ jobs:
|
|||||||
build-macos-universal-wheel:
|
build-macos-universal-wheel:
|
||||||
name: 'Build macOS universal wheel'
|
name: 'Build macOS universal wheel'
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: bdk-python
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python:
|
python:
|
||||||
@ -65,30 +63,22 @@ jobs:
|
|||||||
- '3.9'
|
- '3.9'
|
||||||
- '3.10'
|
- '3.10'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python }}
|
|
||||||
- run: python3 --version
|
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python-version: ${{ matrix.python }}
|
||||||
|
- run: python3 --version
|
||||||
- run: rustup target add aarch64-apple-darwin
|
- run: rustup target add aarch64-apple-darwin
|
||||||
- run: |
|
- run: pip3 install --user -r requirements.txt
|
||||||
cd bdk-python
|
- run: pip3 install --user wheel
|
||||||
pip3 install --user -r requirements.txt
|
- run: bash generate.sh
|
||||||
- run: |
|
|
||||||
cd bdk-python
|
|
||||||
pip3 install --user wheel
|
|
||||||
- run: |
|
|
||||||
cd bdk-python
|
|
||||||
bash generate.sh
|
|
||||||
- name: build wheel
|
- name: build wheel
|
||||||
env:
|
env:
|
||||||
ARCHFLAGS: "-arch x86_64 -arch arm64"
|
ARCHFLAGS: "-arch x86_64 -arch arm64"
|
||||||
run: |
|
run: python3 setup.py -v bdist_wheel
|
||||||
cd bdk-python
|
|
||||||
python3 setup.py -v bdist_wheel
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: bdkpython-macos-${{ matrix.python }}
|
name: bdkpython-macos-${{ matrix.python }}
|
||||||
@ -97,6 +87,9 @@ jobs:
|
|||||||
build-windows-wheel:
|
build-windows-wheel:
|
||||||
name: 'Build windows wheel'
|
name: 'Build windows wheel'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: bdk-python
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python:
|
python:
|
||||||
@ -105,28 +98,20 @@ jobs:
|
|||||||
- '3.9'
|
- '3.9'
|
||||||
- '3.10'
|
- '3.10'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: ${{ matrix.python }}
|
|
||||||
- run: python --version
|
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- run: |
|
- uses: actions/setup-python@v2
|
||||||
cd bdk-python
|
with:
|
||||||
pip install --user -r requirements.txt
|
python-version: ${{ matrix.python }}
|
||||||
- run: |
|
- run: python --version
|
||||||
cd bdk-python
|
- run: pip install --user -r requirements.txt
|
||||||
bash generate.sh
|
- run: bash generate.sh
|
||||||
shell: bash
|
shell: bash
|
||||||
- run: |
|
- run: pip install --user wheel
|
||||||
cd bdk-python
|
|
||||||
pip install --user wheel
|
|
||||||
- name: build wheel
|
- name: build wheel
|
||||||
run: |
|
run: python setup.py -v bdist_wheel
|
||||||
cd bdk-python
|
|
||||||
python setup.py -v bdist_wheel
|
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: bdkpython-win-${{ matrix.python }}
|
name: bdkpython-win-${{ matrix.python }}
|
||||||
@ -135,17 +120,20 @@ jobs:
|
|||||||
publish-pypi:
|
publish-pypi:
|
||||||
name: 'Publish on PyPI'
|
name: 'Publish on PyPI'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: bdk-python
|
||||||
needs: [build-manylinux2014-x86_64-wheel, build-macos-universal-wheel, build-windows-wheel]
|
needs: [build-manylinux2014-x86_64-wheel, build-macos-universal-wheel, build-windows-wheel]
|
||||||
# needs: [build-macos-universal-wheel]
|
# needs: [build-macos-universal-wheel]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: 'Download artifacts in dist/ directory'
|
- name: 'Download artifacts in dist/ directory'
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|
||||||
# - name: Display structure of downloaded files
|
# - name: Display structure of downloaded files
|
||||||
# run: ls -R
|
# run: ls -R
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user