Skip to content

Commit 209ee75

Browse files
authored
Merge pull request #60 from qorix-group/pawelrutkaq_use_new_toolchain
Use new toolchain
2 parents c348284 + 0ef9720 commit 209ee75

File tree

6 files changed

+88
-52
lines changed

6 files changed

+88
-52
lines changed

.bazelrc

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,25 @@ common --registry=https://raw.githubusercontent.com/eclipse-score/bazel_registry
99
common --registry=https://bcr.bazel.build
1010
common --credential_helper=*.qnx.com=%workspace%/scripts/internal/qnx_creds.py
1111

12-
build:build_qnx8 --platforms=@score_bazel_platforms//:arm64-qnx8_0
13-
build:build_qnx8 --extra_toolchains=@toolchains_qnx_qcc//:qcc_aarch64
14-
build:build_qnx8 --extra_toolchains=@score_toolchains_rust//toolchains/aarch64-unknown-qnx8_0:toolchain_aarch64_qnx8_0
15-
build:build_qnx8 --extra_toolchains=@score_toolchains_rust//toolchains/x86_64-unknown-linux-gnu:toolchain_x86_64_linux
16-
build:build_qnx8 --extra_toolchains=@toolchains_qnx_ifs//:ifs_x86_64
17-
build:build_qnx8 --extra_toolchains=@toolchains_qnx_ifs//:ifs_aarch64
18-
19-
common --extra_toolchains=@gcc_toolchain//:host_gcc_12
12+
# Ferrocene must be common compiler for HOST. To ensure metadata compatibility for proc macro crates!
13+
build:_common --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu
14+
15+
build:arm64-qnx --config=_common
16+
build:arm64-qnx --platforms=@score_bazel_platforms//:aarch64-qnx-sdp_8.0.0-posix
17+
build:arm64-qnx --extra_toolchains=@score_qcc_aarch64_toolchain//:aarch64-qnx-sdp_8.0.0-posix
18+
build:arm64-qnx --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_aarch64_unknown_nto_qnx800
19+
20+
build:x86_64-qnx --config=_common
21+
build:x86_64-qnx --platforms=@score_bazel_platforms//:x86_64-qnx-sdp_8.0.0-posix
22+
build:x86_64-qnx --extra_toolchains=@score_qcc_x86_64_toolchain//:x86_64-qnx-sdp_8.0.0-posix
23+
build:x86_64-qnx --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_pc_nto_qnx800
24+
25+
# TODO arm64 when rust support is there
26+
27+
build:x86_64-linux --config=_common
28+
build:x86_64-linux --platforms=@score_bazel_platforms//:x86_64-linux-gcc_12.2.0-posix
29+
build:x86_64-linux --extra_toolchains=@score_gcc_x86_64_toolchain//:x86_64-linux-gcc_12.2.0-posix
30+
build:x86_64-linux --extra_toolchains=@score_toolchains_rust//toolchains/ferrocene:ferrocene_x86_64_unknown_linux_gnu
31+
32+
# to be removed
33+
build:build_qnx8 --config=arm64-qnx

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ jobs:
5555
5656
- name: Build with Bazel
5757
run: |
58-
bazel build //...
58+
bazel build --config x86_64-linux //...

.github/workflows/build_qnx8.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,28 @@ on:
1818
merge_group:
1919
types: [checks_requested]
2020
jobs:
21-
qnx-build:
21+
qnx-build-arm64:
2222
uses: eclipse-score/cicd-workflows/.github/workflows/qnx-build.yml@main
2323
permissions:
2424
contents: read
2525
pull-requests: read
2626
with:
2727
bazel-target: '//src/...'
28-
bazel-config: 'build_qnx8'
28+
bazel-config: 'arm64-qnx8'
29+
credential-helper: 'scripts/internal/qnx_creds.py'
30+
environment-name: 'workflow-approval'
31+
secrets:
32+
score-qnx-license: ${{ secrets.SCORE_QNX_LICENSE }}
33+
score-qnx-user: ${{ secrets.SCORE_QNX_USER }}
34+
score-qnx-password: ${{ secrets.SCORE_QNX_PASSWORD }}
35+
qnx-build-x86_64:
36+
uses: eclipse-score/cicd-workflows/.github/workflows/qnx-build.yml@main
37+
permissions:
38+
contents: read
39+
pull-requests: read
40+
with:
41+
bazel-target: '//src/...'
42+
bazel-config: 'x86_64-qnx8'
2943
credential-helper: 'scripts/internal/qnx_creds.py'
3044
environment-name: 'workflow-approval'
3145
secrets:

.github/workflows/component_integration_tests_bazel.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,16 @@ jobs:
6161
6262
- name: Build Test Scenarios with Bazel
6363
run: |
64-
bazel build //tests/test_scenarios/rust:test_scenarios
64+
bazel build --config x86_64-linux //tests/test_scenarios/rust:test_scenarios
6565
6666
- name: Build Test Scenarios with Bazel (PR)
6767
if: github.event_name == 'pull_request' || github.event_name == 'push'
6868
run: |
69-
bazel test //tests/test_cases:cit
69+
bazel test --config x86_64-linux //tests/test_cases:cit
7070
7171
- name: Build Test Scenarios with Bazel (Nightly)
7272
if: github.event_name == 'schedule'
7373
env:
7474
NIGHTLY: TRUE
7575
run: |
76-
bazel test //tests/test_cases:cit_repeat --test_timeout=1200
76+
bazel test --config x86_64-linux //tests/test_cases:cit_repeat --test_timeout=1200

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,4 @@ jobs:
5555
- name: Run Tests via Bazel
5656
run: |
5757
echo "Running: bazel test //src/..."
58-
bazel test //src/...
58+
bazel test --config x86_64-linux //src/...

MODULE.bazel

Lines changed: 45 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,19 @@ module(
2020
bazel_dep(name = "rules_python", version = "1.4.1")
2121
bazel_dep(name = "bazel_skylib", version = "1.7.1")
2222
bazel_dep(name = "rules_rust", version = "0.61.0")
23+
git_override(
24+
module_name = "rules_rust",
25+
commit = "d655071dfc8783bbdad4e27db349abd221ba170c",
26+
remote = "https://github.com/pawelrutkaq/rules_rust.git", # To be fixed once rule_rust is in score bazel registry
27+
)
28+
2329
bazel_dep(name = "rules_cc", version = "0.1.1")
2430
bazel_dep(name = "aspect_rules_lint", version = "1.0.3")
2531
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1")
2632
bazel_dep(name = "platforms", version = "1.0.0")
2733

2834
# S-CORE process rules
29-
bazel_dep(name = "score_bazel_platforms", version = "0.0.3")
35+
bazel_dep(name = "score_bazel_platforms", version = "0.0.4")
3036
bazel_dep(name = "score_docs_as_code", version = "2.2.0")
3137
bazel_dep(name = "score_tooling", version = "1.0.4")
3238

@@ -35,10 +41,8 @@ bazel_dep(name = "score_platform", version = "0.4.2", dev_dependency = True) #
3541
bazel_dep(name = "score_virtualization", version = "0.0.1", dev_dependency = True)
3642

3743
# Toolchains and extensions
38-
bazel_dep(name = "score_toolchains_gcc", version = "0.5", dev_dependency = True)
39-
bazel_dep(name = "score_toolchains_qnx", version = "0.0.6", dev_dependency = True)
40-
bazel_dep(name = "rust_qnx8_toolchain", version = "1.2.0", dev_dependency = True)
41-
bazel_dep(name = "score_toolchains_rust", version = "0.1.1", dev_dependency = True)
44+
bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.2.2", dev_dependency = True)
45+
bazel_dep(name = "score_toolchains_rust", version = "0.4.0", dev_dependency = True)
4246

4347
# Others
4448
bazel_dep(name = "custom_qemu", version = "1.0.0", dev_dependency = True)
@@ -54,20 +58,6 @@ git_override(
5458
remote = "https://github.com/qorix-group/score_virtualization.git",
5559
)
5660

57-
git_override(
58-
module_name = "score_toolchains_rust",
59-
commit = "bcf8e5364f72cf136ec81960350a82e2b5c45449",
60-
remote = "https://github.com/eclipse-score/toolchains_rust.git",
61-
)
62-
63-
archive_override(
64-
module_name = "rust_qnx8_toolchain",
65-
strip_prefix = "qnx8",
66-
urls = [
67-
"https://github.com/qorix-group/rust-lang-qnx8/releases/download/1.2.0/qnx8_rust_toolchain.tar.gz",
68-
],
69-
)
70-
7161
archive_override(
7262
module_name = "custom_qemu",
7363
integrity = "sha256-3V2d+p7nP0tsbrVWOPYUSJogLNal43CIAHEto6Vjdfg=",
@@ -77,21 +67,43 @@ archive_override(
7767
],
7868
)
7969

80-
# Extensions
81-
82-
gcc = use_extension("@score_toolchains_gcc//extentions:gcc.bzl", "gcc", dev_dependency = True)
70+
gcc = use_extension("@score_bazel_cpp_toolchains//extensions:gcc.bzl", "gcc", dev_dependency = True)
8371
gcc.toolchain(
84-
sha256 = "457f5f20f57528033cb840d708b507050d711ae93e009388847e113b11bf3600",
85-
strip_prefix = "x86_64-unknown-linux-gnu",
86-
url = "https://github.com/eclipse-score/toolchains_gcc_packages/releases/download/0.0.1/x86_64-unknown-linux-gnu_gcc12.tar.gz",
72+
name = "score_gcc_x86_64_toolchain",
73+
target_cpu = "x86_64",
74+
target_os = "linux",
75+
use_default_package = True,
76+
version = "12.2.0",
8777
)
88-
use_repo(gcc, "gcc_toolchain", "gcc_toolchain_gcc")
89-
90-
toolchains_qnx = use_extension("@score_toolchains_qnx//:extensions.bzl", "toolchains_qnx", dev_dependency = True)
91-
toolchains_qnx.sdp(
92-
sha256 = "f2e0cb21c6baddbcb65f6a70610ce498e7685de8ea2e0f1648f01b327f6bac63",
93-
strip_prefix = "installation",
94-
url = "https://www.qnx.com/download/download/79858/installation.tgz",
78+
gcc.toolchain(
79+
name = "score_gcc_aarch64_toolchain",
80+
target_cpu = "aarch64",
81+
target_os = "linux",
82+
use_default_package = True,
83+
version = "12.2.0",
84+
)
85+
gcc.toolchain(
86+
name = "score_qcc_x86_64_toolchain",
87+
sdp_version = "8.0.0",
88+
target_cpu = "x86_64",
89+
target_os = "qnx",
90+
use_default_package = True,
91+
version = "12.2.0",
92+
)
93+
gcc.toolchain(
94+
name = "score_qcc_aarch64_toolchain",
95+
sdp_version = "8.0.0",
96+
target_cpu = "aarch64",
97+
target_os = "qnx",
98+
use_default_package = True,
99+
version = "12.2.0",
100+
)
101+
use_repo(
102+
gcc,
103+
"score_gcc_aarch64_toolchain",
104+
"score_gcc_x86_64_toolchain",
105+
"score_qcc_aarch64_toolchain",
106+
"score_qcc_x86_64_toolchain",
95107
)
96108

97109
PYTHON_VERSION = "3.12"
@@ -113,9 +125,5 @@ use_repo(python)
113125

114126
use_repo(pip, "pip_score_venv_test")
115127

116-
use_repo(toolchains_qnx, "toolchains_qnx_sdp")
117-
use_repo(toolchains_qnx, "toolchains_qnx_qcc")
118-
use_repo(toolchains_qnx, "toolchains_qnx_ifs")
119-
120128
# S-CORE crates
121-
bazel_dep(name = "score_crates", version = "0.0.5")
129+
bazel_dep(name = "score_crates", version = "0.0.7")

0 commit comments

Comments
 (0)