Skip to content

Commit 9395983

Browse files
build: make justfiles awesome
1 parent 85c650c commit 9395983

File tree

4 files changed

+107
-52
lines changed

4 files changed

+107
-52
lines changed

bdk-android/justfile

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,45 @@
1-
default:
2-
just --list
3-
4-
build-linux:
5-
bash ./scripts/build-linux-x86_64.sh
6-
7-
build-macos:
8-
bash ./scripts/build-macos-aarch64.sh
1+
[group("Repo")]
2+
[doc("Default command; list all available commands.")]
3+
@list:
4+
just --list --unsorted
5+
6+
[group("Repo")]
7+
[doc("Open repo on GitHub in your default browser.")]
8+
repo:
9+
open https://github.com/bitcoindevkit/bdk-ffi
10+
11+
[group("Repo")]
12+
[doc("Build the API docs.")]
13+
docs:
14+
./gradlew :lib:dokkaGeneratePublicationHtml
915

10-
build-windows:
11-
bash ./scripts/build-windows-x86_64.sh
16+
[group("Repo")]
17+
[doc("Publish the library to your local Maven repository.")]
18+
publish-local:
19+
./gradlew publishToMavenLocal -P localBuild
1220

21+
[group("Build")]
22+
[doc("Build the library for given ARCH.")]
23+
build ARCH="macos-aarch64":
24+
bash ./scripts/build-{{ARCH}}.sh
25+
26+
[group("Build")]
27+
[doc("List available architectures for the build command.")]
28+
@list-architectures:
29+
echo "Available architectures:"
30+
echo " - linux-x86_64"
31+
echo " - macos-aarch64"
32+
echo " - windows-x86_64"
33+
34+
[group("Build")]
35+
[doc("Remove all caches and previous build directories to start from scratch.")]
1336
clean:
1437
rm -rf ../bdk-ffi/target/
1538
rm -rf ./build/
1639
rm -rf ./lib/build/
1740
rm -rf ./plugins/build/
1841

19-
publish-local:
20-
./gradlew publishToMavenLocal -P localBuild
21-
42+
[group("Test")]
43+
[doc("Run all tests.")]
2244
test:
2345
./gradlew connectedAndroidTest
24-
25-
test-specific TEST:
26-
./gradlew test --tests {{TEST}}
27-
28-
build-docs:
29-
./gradlew :lib:dokkaGeneratePublicationHtml

bdk-jvm/justfile

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,50 @@
1-
default:
2-
just --list
3-
4-
build-linux:
5-
bash ./scripts/build-linux-x86_64.sh
6-
7-
build-macos-aarch64:
8-
bash ./scripts/build-macos-aarch64.sh
1+
[group("Repo")]
2+
[doc("Default command; list all available commands.")]
3+
@list:
4+
just --list --unsorted
5+
6+
[group("Repo")]
7+
[doc("Open repo on GitHub in your default browser.")]
8+
repo:
9+
open https://github.com/bitcoindevkit/bdk-ffi
10+
11+
[group("Repo")]
12+
[doc("Build the API docs.")]
13+
docs:
14+
./gradlew :lib:dokkaGeneratePublicationHtml
915

10-
build-macos-x86_64:
11-
bash ./scripts/build-macos-x86_64.sh
12-
13-
build-windows:
14-
bash ./scripts/build-windows-x86_64.sh
16+
[group("Repo")]
17+
[doc("Publish the library to your local Maven repository.")]
18+
publish-local:
19+
./gradlew publishToMavenLocal -P localBuild
1520

21+
[group("Build")]
22+
[doc("Build the library for given ARCH.")]
23+
build ARCH="macos-aarch64":
24+
bash ./scripts/build-{{ARCH}}.sh
25+
26+
[group("Build")]
27+
[doc("List available architectures for the build command.")]
28+
@list-architectures:
29+
echo "Available architectures:"
30+
echo " - linux-x86_64"
31+
echo " - macos-aarch64"
32+
echo " - macos-x86_64"
33+
echo " - windows-x86_64"
34+
35+
[group("Build")]
36+
[doc("Remove all caches and previous build directories to start from scratch.")]
1637
clean:
1738
rm -rf ../bdk-ffi/target/
1839
rm -rf ./build/
1940
rm -rf ./lib/build/
2041

21-
publish-local:
22-
./gradlew publishToMavenLocal -P localBuild
23-
24-
test:
25-
./gradlew test
42+
[group("Test")]
43+
[doc("Run all tests, unless a specific test is provided.")]
44+
test *TEST:
45+
./gradlew test {{ if TEST == "" { "" } else { "--tests " + TEST } }}
2646

47+
[group("Test")]
48+
[doc("Run only offline tests.")]
2749
test-offline:
2850
./gradlew test -P excludeConnectedTests
29-
30-
test-specific TEST:
31-
./gradlew test --tests {{TEST}}
32-
33-
build-docs:
34-
./gradlew :lib:dokkaGeneratePublicationHtml

bdk-python/justfile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,22 @@
1-
default:
2-
just --list
1+
[group("Repo")]
2+
[doc("Default command; list all available commands.")]
3+
@list:
4+
just --list --unsorted
35

4-
build-local-mac:
5-
bash ./scripts/generate-macos-arm64.sh && python3 setup.py bdist_wheel --verbose
6+
[group("Repo")]
7+
[doc("Open repo on GitHub in your default browser.")]
8+
repo:
9+
open https://github.com/bitcoindevkit/bdk-ffi
610

11+
[group("Build")]
12+
[doc("Remove all caches and previous builds to start from scratch.")]
713
clean:
814
rm -rf ../bdk-ffi/target/
915
rm -rf ./bdkpython.egg-info/
1016
rm -rf ./build/
1117
rm -rf ./dist/
1218

19+
[group("Test")]
20+
[doc("Run all tests.")]
1321
test:
1422
python3 -m unittest --verbose

bdk-swift/justfile

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
1-
default:
2-
just --list
1+
[group("Repo")]
2+
[doc("Default command; list all available commands.")]
3+
@list:
4+
just --list --unsorted
35

6+
[group("Repo")]
7+
[doc("Open repo on GitHub in your default browser.")]
8+
repo:
9+
open https://github.com/bitcoindevkit/bdk-ffi
10+
11+
[group("Build")]
12+
[doc("Build the library.")]
413
build:
514
bash ./build-xcframework.sh
615

16+
[group("Build")]
17+
[doc("Remove all caches and previous builds to start from scratch.")]
718
clean:
819
rm -rf ../bdk-ffi/target/
920

10-
test:
11-
swift test
21+
[group("Test")]
22+
[doc("Run all tests, unless a filter is provided.")]
23+
test *FILTER:
24+
swift test {{ if FILTER == "" { "" } else { "--filter " + FILTER } }}
1225

26+
[group("Test")]
27+
[doc("Run only offline tests.")]
1328
test-offline:
14-
swift test --skip LiveElectrumClientTests --skip LiveMemoryWalletTests --skip LiveTransactionTests --skip LiveTxBuilderTests --skip LiveWalletTests
29+
swift test --filter Offline

0 commit comments

Comments
 (0)