Skip to content

Commit

Permalink
Streamline CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
thunderbiscuit committed Mar 11, 2023
1 parent c1243f9 commit d48bacd
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
security_audit:
name: Security Audit
name: Security audit
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/cont_integration.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: bdk-ffi CI
name: Rust layer CI
on:
push:
paths:
Expand All @@ -10,40 +10,49 @@ on:
jobs:
build-test:
name: Build and test
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
matrix:
rust:
- version: 1.63.0 # STABLE
clippy: true
- version: 1.61.0 # MSRV
steps:
- name: checkout
- name: Checkout
uses: actions/checkout@v2

- name: Generate cache key
run: echo "${{ matrix.rust.version }} ${{ matrix.features }}" | tee .cache_key
- name: cache

- name: Cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('.cache_key') }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}

- name: Set default toolchain
run: rustup default ${{ matrix.rust.version }}

- name: Set profile
run: rustup set profile minimal

- name: Add clippy
if: ${{ matrix.rust.clippy }}
run: rustup component add clippy

- name: Update toolchain
run: rustup update

- name: Build
run: cargo build --features uniffi/cli

- name: Clippy
if: ${{ matrix.rust.clippy }}
run: cargo clippy --all-targets --features "uniffi/bindgen-tests uniffi/cli" -- -D warnings

- name: Test
run: CLASSPATH=./tests/jna/jna-5.8.0.jar cargo test --features uniffi/bindgen-tests,uniffi/cli

Expand All @@ -53,13 +62,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set default toolchain
run: rustup default nightly

- name: Set profile
run: rustup set profile minimal

- name: Add rustfmt
run: rustup component add rustfmt

- name: Update toolchain
run: rustup update

- name: Check fmt
run: cargo fmt --all -- --config format_code_in_doc_comments=true --check
4 changes: 2 additions & 2 deletions .github/workflows/publish-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Check out PR branch
uses: actions/checkout@v2

- name: cache
- name: Cache
uses: actions/cache@v2
with:
path: |
Expand All @@ -35,7 +35,7 @@ jobs:
distribution: temurin
java-version: 11

- name: Install rust android targets
- name: Install Rust Android targets
run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi

- name: Build bdk-android library
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-jvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ on: [workflow_dispatch]

jobs:
build-jvm-macOS-M1-native-lib:
name: Create M1 and x86_64 JVM native binaries
name: "Create M1 and x86_64 JVM native binaries"
runs-on: macos-12
steps:
- name: Checkout publishing branch
- name: "Checkout publishing branch"
uses: actions/checkout@v2

- name: Cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ jobs:
with:
path: dist/

# - name: 'Publish on test PyPI'
# - name: "Publish on test PyPI"
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/test-android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Install Android NDK 21.4.7075529
- name: "Install Android NDK 21.4.7075529"
run: |
ANDROID_ROOT=/usr/local/lib/android
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
- name: Check out PR branch
- name: "Check out PR branch"
uses: actions/checkout@v2

- name: cache
- name: "Cache"
uses: actions/cache@v2
with:
path: |
Expand All @@ -37,16 +37,16 @@ jobs:
./target
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}

- name: Set up JDK
- name: "Set up JDK"
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11

- name: Install rust android targets
- name: "Install Rust Android targets"
run: rustup target add x86_64-linux-android aarch64-linux-android armv7-linux-androideabi

- name: Run Android tests
- name: "Run Android tests"
run: |
cd bdk-android
./gradlew test --console=rich
4 changes: 2 additions & 2 deletions .github/workflows/test-jvm.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test JVM
name: Test Kotlin/JVM
on:
push:
paths:
Expand All @@ -16,7 +16,7 @@ jobs:
- name: Check out PR branch
uses: actions/checkout@v2

- name: cache
- name: Cache
uses: actions/cache@v2
with:
path: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ jobs:
- name: "Build wheel"
run: ${PYBIN}/python setup.py bdist_wheel --verbose

- name: Install wheel
- name: "Install wheel"
run: ${PYBIN}/pip install ./dist/*.whl

- name: Run tests
- name: "Run tests"
run: ${PYBIN}/python -m unittest tests/test_bdk.py --verbose

- name: Upload artifact test
- name: "Upload artifact test"
uses: actions/upload-artifact@v2
with:
name: bdkpython-manylinux2014-x86_64-${{ matrix.python }}
Expand Down Expand Up @@ -98,10 +98,10 @@ jobs:
ARCHFLAGS: "-arch x86_64 -arch arm64"
run: python3 setup.py bdist_wheel --verbose

- name: Install wheel
- name: "Install wheel"
run: pip3 install ./dist/*.whl

- name: Run tests
- name: "Run tests"
run: python3 -m unittest tests/test_bdk.py --verbose

build-windows-wheel:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-swift.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
build:
runs-on: macos-12
steps:
- name: Checkout branch
- name: Checkout
uses: actions/checkout@v2

- name: Install Rust targets
Expand Down

0 comments on commit d48bacd

Please sign in to comment.