Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: extended native-image build options #107

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8ff0f3b
fix(native_image): fix C++ toolchain env setup
fmeum Aug 31, 2023
298d1d9
fix: wrapped env-injection callable
sgammon Sep 1, 2023
fa2979b
fix: refactor to split `classic` vs `modern` rules
sgammon Sep 1, 2023
a66caa0
fix: cleanup after rule internal refactor
sgammon Sep 1, 2023
3dffe94
fix: compile environment for msvc/native-image
sgammon Sep 1, 2023
0f2c2a0
chore: refactor/extract native cc resolution logic
sgammon Sep 1, 2023
12e5346
chore: general cleanup
sgammon Sep 1, 2023
5762b12
chore: run buildifier
sgammon Sep 1, 2023
46558d8
fix: don't build/test tools by default
sgammon Sep 1, 2023
12be24c
fix: `make test` should run all tests
sgammon Sep 1, 2023
57c78a3
fix: use default shell env on linux, too
sgammon Sep 1, 2023
13fe527
chore: update bzlmod locks
sgammon Sep 1, 2023
299b0bd
chore: `default_executable_name` → `executable_name`
sgammon Sep 1, 2023
8ddc0ff
fix: no default tool for modern rules
sgammon Sep 1, 2023
551288c
chore: rebuild apidoc
sgammon Sep 1, 2023
bae6a07
feat(native_image): add `static_zlib`
fmeum Aug 31, 2023
ad0cf12
chore: run buildifier
sgammon Sep 1, 2023
e48acfe
fix: rollback `use_default_shell_env`, remove msvc vars from tests
sgammon Sep 1, 2023
aeae392
fix: fix modern build on Windows by adding `cmd.exe` to `PATH`
fmeum Sep 1, 2023
cb2429c
fix(native_image): add missing _linux_constraint attribute
fmeum Sep 1, 2023
442d2ac
fix!: add alias indirection for `gvm` toolchain
sgammon Sep 1, 2023
1b04921
fix: run pr tests on non-mainline merge base
sgammon Sep 1, 2023
b104563
test: add more feature integration tests
sgammon Sep 1, 2023
b1dead8
fix: default value for `distribution`
sgammon Sep 1, 2023
b886a39
fix: don't set `BAZEL_USE_CPP_ONLY_TOOLCHAIN` in testing
sgammon Sep 1, 2023
2ad99fe
docs: document `graalvm_repository` attributes
sgammon Sep 1, 2023
da8f20b
fix: stray parameter to `_graal_updater_path`
sgammon Sep 1, 2023
2d7e736
chore: rebuild bzlmod lock and docs
sgammon Sep 2, 2023
9241746
feat: bazel settings integration
sgammon Sep 1, 2023
009f43f
chore(deps): update dependency bazel_features to v1
renovate[bot] Sep 2, 2023
44a9ed8
chore(deps): update dependency buildifier_prebuilt to v6.3.3
renovate[bot] Sep 2, 2023
dc29865
chore(deps): update dependency io_bazel_stardoc to v0.6.2
renovate[bot] Sep 2, 2023
bc8cfab
chore(deps): update dependency aspect_bazel_lib to v1.34.1
renovate[bot] Sep 2, 2023
7def965
chore(deps): update googleapis digest to 2a10735
renovate[bot] Sep 2, 2023
8aad856
chore: update bzlmod locks
sgammon Sep 2, 2023
81684c7
test: extend `components-ce` to test `js` use
sgammon Sep 3, 2023
d08e249
docs: apidoc for toolchain internals
sgammon Sep 4, 2023
f630c59
feat: extended native-image build options
sgammon Sep 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 64 additions & 26 deletions .github/workflows/module.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,70 @@ jobs:
labs: false
skip: false

# Test: Bazel 4
- label: Bazel 4
target: sample
action: build
directory: "./example/integration_tests/bazel4"
labs: false
skip: ${{ contains(inputs.runner, 'windows') }}

# Test: Bazel 5
- label: Bazel 5
target: sample
action: build
directory: "./example/integration_tests/bazel5"
labs: false
skip: ${{ contains(inputs.runner, 'windows') }}

# Test: Bazel 6
- label: Bazel 6
target: sample
action: build
directory: "./example/integration_tests/bazel6"
labs: false
skip: false

# Test: Inert
- label: Inert
target: sample
action: build
directory: "./example/integration_tests/inert"
labs: false
skip: false

# Test: Inert Workspace
- label: Inert Workspace
target: sample
action: build
directory: "./example/integration_tests/inert-workspace"
labs: false
skip: false

# Test: Components on CE
- label: Components (CE)
target: sample
action: build
directory: "./example/integration_tests/components-ce"
labs: false
skip: false

# Test: Components on GVM
- label: Components (Oracle)
target: sample
action: build
directory: "./example/integration_tests/components-oracle"
labs: false
skip: false

# Test: Java Toolchain
- label: Java Toolchain
target: sample
action: build
directory: "./example/integration_tests/java-toolchain"
labs: false
skip: false

# Test: Legacy Rules
- label: Legacy Rules
target: sample
Expand Down Expand Up @@ -243,30 +307,6 @@ jobs:
labs: false
skip: false

# Test: Bazel 4
- label: Bazel 4
target: sample
action: build
directory: "./example/integration_tests/bazel4"
labs: false
skip: ${{ contains(inputs.runner, 'windows') }}

# Test: Bazel 5
- label: Bazel 5
target: sample
action: build
directory: "./example/integration_tests/bazel5"
labs: false
skip: ${{ contains(inputs.runner, 'windows') }}

# Test: Bazel 6
- label: Bazel 6
target: sample
action: build
directory: "./example/integration_tests/bazel6"
labs: false
skip: false

steps:
- name: Harden Runner
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
Expand Down Expand Up @@ -297,5 +337,3 @@ jobs:
working-directory: ${{ matrix.directory }}
shell: bash
run: bazel ${{ matrix.action || 'build' }} "${{ matrix.target || '//...' }}"
env:
BAZEL_USE_CPP_ONLY_TOOLCHAIN: "1"
2 changes: 0 additions & 2 deletions .github/workflows/on.pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ name: "PR"
"on":
## Run on PR filings
pull_request:
branches:
- main
paths:
- docs/**/*.*
- example/**/*.*
Expand Down
6 changes: 4 additions & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ load(
alias(
name = target,
actual = "//tools:%s" % target,
) for target in [
)
for target in [
"python_requirements",
"buildifier.check",
"buildifier.format",
Expand All @@ -34,7 +35,8 @@ exports_files([
bzl_library(
name = "lib",
deps = [
"//lib:%s" % target for target in [
"//lib:%s" % target
for target in [
"defs",
"toolchain",
"repositories",
Expand Down
592 changes: 0 additions & 592 deletions MODULE-resolved.bzl

This file was deleted.

39 changes: 25 additions & 14 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@ module(
)

JAVA_VERSION = "20"

PYTHON_VERSION = "3.11"

NODE_VERSION = "20.5.0"

GRAALVM_VERSION = "20.0.2"

GRAALVM_DIST = "ce"

GRAALVM_SDK_VERSION = "23.0.1"

GRAALVM_COMPONENTS = [
"wasm",
"js",
Expand All @@ -37,6 +42,11 @@ bazel_dep(
name = "bazel_skylib",
version = "1.4.2",
)
bazel_dep(
name = "apple_support",
version = "1.8.1",
repo_name = "build_bazel_apple_support",
)

##
## Dependencies: Development
Expand Down Expand Up @@ -64,7 +74,7 @@ bazel_dep(
)
bazel_dep(
name = "aspect_bazel_lib",
version = "1.34.0",
version = "1.34.1",
dev_dependency = True,
)
bazel_dep(
Expand All @@ -80,10 +90,9 @@ bazel_dep(
bazel_dep(
name = "protobuf",
version = "21.7",
repo_name = "com_google_protobuf",
dev_dependency = True,
repo_name = "com_google_protobuf",
)

bazel_dep(
name = "rules_go",
version = "0.41.0",
Expand Down Expand Up @@ -124,7 +133,7 @@ bazel_dep(
)
bazel_dep(
name = "buildifier_prebuilt",
version = "6.1.2.2",
version = "6.3.3",
dev_dependency = True,
)

Expand Down Expand Up @@ -180,8 +189,13 @@ use_repo(
gvm,
"graalvm",
)

register_toolchains(
"@graalvm//:jvm",
dev_dependency = True,
)
register_toolchains(
"@graalvm//:all",
"@graalvm//:sdk",
dev_dependency = True,
)

Expand All @@ -195,9 +209,9 @@ python = use_extension(
dev_dependency = True,
)
python.toolchain(
python_version = PYTHON_VERSION,
is_default = True,
configure_coverage_tool = True,
is_default = True,
python_version = PYTHON_VERSION,
)
use_repo(python, "python_3_11", "python_versions")

Expand All @@ -206,14 +220,14 @@ pip = use_extension(
"pip",
dev_dependency = True,
)

pip.parse(
extra_pip_args = [
"--no-binary",
"grequests",
],
hub_name = "pip",
python_version = PYTHON_VERSION,
requirements_lock = "@//:requirements_lock.txt",
extra_pip_args = [
"--no-binary", "grequests",
],
)
use_repo(pip, "pip", "pip_311")

Expand All @@ -226,19 +240,16 @@ node = use_extension(
"node",
dev_dependency = True,
)

node.toolchain(node_version = NODE_VERSION)

npm = use_extension(
"@aspect_rules_js//npm:extensions.bzl",
"npm",
dev_dependency = True,
)

npm.npm_translate_lock(
name = "npm",
pnpm_lock = "//:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)

use_repo(npm, "npm")
Loading
Loading