Skip to content

Commit

Permalink
fix: bin postfix for shared library targets
Browse files Browse the repository at this point in the history
- fix: use `dylib` postfix for shared library outputs on mac
- fix: use `so` postfix for shared library outputs on linux
- fix: consolidate bin postfix `exe` with new behavior
- test: add integration test for shared libs on all platforms

Closes: #216
Signed-off-by: Sam Gammon <[email protected]>
  • Loading branch information
sgammon committed Jan 1, 2024
1 parent f01d90f commit de4c886
Show file tree
Hide file tree
Showing 11 changed files with 1,072 additions and 6 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/module.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,14 @@ jobs:
labs: false
skip: false

# Test: Shared Library
- label: Shared Library
target: sample
action: build
directory: "./example/integration_tests/shared-lib"
labs: false
skip: false

# Test: Maven Artifacts
- label: Maven Artifacts
target: sample
Expand Down
1 change: 1 addition & 0 deletions example/integration_tests/shared-lib/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build --enable_bzlmod
1 change: 1 addition & 0 deletions example/integration_tests/shared-lib/.bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.0.0-pre.20230816.3
35 changes: 35 additions & 0 deletions example/integration_tests/shared-lib/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"Sample bzlmod-style project which uses the GraalVM Rules for Bazel."

module(
name = "rules_graalvm_bzlmod_sample",
version = "0.0.1",
)

bazel_dep(
name = "rules_java",
version = "6.4.0",
)
bazel_dep(
name = "rules_graalvm",
version = "0.0.0",
)
local_path_override(
module_name = "rules_graalvm",
path = "../../..",
)

gvm = use_extension("@rules_graalvm//:extensions.bzl", "graalvm")
gvm.graalvm(
name = "graalvm",
distribution = "ce",
java_version = "20",
version = "20.0.2",
)
use_repo(
gvm,
"graalvm",
)

register_toolchains("@graalvm//:jvm")

register_toolchains("@graalvm//:sdk")
Loading

0 comments on commit de4c886

Please sign in to comment.