File tree 4 files changed +42
-5
lines changed
4 files changed +42
-5
lines changed Original file line number Diff line number Diff line change 1
1
target /
2
2
scripts /.coursier
3
3
scripts /.scalafmt- *
4
+ /scala-native-bindgen- *
Original file line number Diff line number Diff line change @@ -8,13 +8,21 @@ This tool generates Scala Native bindings from C headers. It's built upon clang
8
8
9
9
## Releasing
10
10
11
- To release version ` x.y.z ` run:
11
+ First build the ` scala-native-bindgen ` executable for both macOS and
12
+ Linux:
13
+
14
+ > scripts/prepare-release.sh
15
+
16
+ You should now have ` scala-native-bindgen-linux ` and
17
+ ` scala-native-bindgen-darwin ` if you ran the script on a macOS machine.
18
+
19
+ Then release version ` x.y.z ` by running:
12
20
13
21
> sbt -Dproject.version=x.y.z release
14
22
15
- Then build the ` scala-native-bindgen ` executable for both macOS and
16
- Linux and upload them to the GitHub release page with the suffix
17
- ` -darwin ` and ` -linux ` , respectively.
23
+ Finally, upload the ` scala-native-bindgen-linux ` and
24
+ ` scala-native-bindgen-darwin ` executables to the release page at:
25
+ < https://github.com/kornilova-l/scala-native-bindgen/releases/tag/vx.y.z >
18
26
19
27
## License
20
28
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ services:
8
8
args :
9
9
- UBUNTU_VERSION=18.04
10
10
- LLVM_VERSION=6.0
11
- entrypoint : [scala-native-bindgen]
11
+ entrypoint : [/ scala-native-bindgen]
12
12
13
13
ubuntu-18.04-llvm-6.0 :
14
14
image : scalabindgen/scala-native-bindgen-builder:ubuntu-18.04-llvm-6.0
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+ #
3
+ # Build Linux and if possible macOS executables.
4
+
5
+ # Bash strict mode
6
+ # http://redsymbol.net/articles/unofficial-bash-strict-mode/
7
+ set -euo pipefail
8
+ IFS=$' \n\t '
9
+
10
+ ROOT=" $( cd " $( dirname " $0 " ) /.." && pwd) "
11
+
12
+ LINUX_EXEC=" $ROOT /scala-native-bindgen-linux"
13
+ if [[ ! -e " $LINUX_EXEC " ]]; then
14
+ docker-compose build bindgen
15
+ local container=" $( docker container create " scalabindgen/scala-native-bindgen:${VERSION:- latest} " ) "
16
+ docker cp " $container :/scala-native-bindgen" " $LINUX_EXEC "
17
+ docker container rm " $container "
18
+ fi
19
+
20
+ MACOS_EXEC=" $ROOT /scala-native-bindgen-darwin"
21
+ if [[ " $( uname -s) " = " Darwin" ]] && [[ ! -e " $MACOS_EXEC " ]]; then
22
+ json_dir=" $( ls /usr/local/Cellar/nlohmann_json/ | sort | tail -n 1) /include"
23
+ rm -rf bindgen/target
24
+ mkdir -p bindgen/target
25
+ (cd bindgen/target && cmake -DSTATIC_LINKING=ON -DCMAKE_CXX_FLAGS=" -isystem $json_dir " ..)
26
+ make -C bindgen/target
27
+ cp bindgen/target/scala-native-bindgen " $MACOS_EXEC "
28
+ fi
You can’t perform that action at this time.
0 commit comments