Commit Graph

245 Commits

Author SHA1 Message Date
Cornelius Riemenschneider
58f69c9385 Make CodeQLPackInfo provider public. 2024-06-13 21:57:46 +02:00
Cornelius Riemenschneider
02100e58d9 Address review. 2024-06-13 21:55:56 +02:00
Cornelius Riemenschneider
92957a63ad Add prefix feature to codeql_pack_group.
Turns out we need this for our production targets.
2024-06-11 17:22:35 +02:00
Cornelius Riemenschneider
3cf719cb39 pkg.bzl: Significantly restructure codeql_pack rule.
This PR introduces a `codeql_pack_rule` that does the heavy lifting
of extracting arch- and common zip files for production dist building.
It also factors out the installer targets for individual packs,
as well as pack groups.

This changes the contract between the internal build system and the pack
definition significantly, which is why an accompanying internal PR is required.
No backwards compatibility layer is provided, as the PR as complex enough as-is.

The individual `codeql_pack` rules are now much simpler,
as they mostly stuff their inputs into a new `_CodeQLPackInfo` provider,
and let the installer and `codeql_pack_group` rules do the heavy lifting.
For working in the external repo with self-contained packs,
the per-pack installer targets are still available.
Internally, we'll only use the new `codeql_pack_group` targets
going forward, both for defining intree-dists and for building
the production zip files.
2024-06-11 13:15:05 +02:00
Cornelius Riemenschneider
092bc6445d Rust/bazel: Port to bzlmod.
This gets rid of our last workspace dependency.
In particular, this change also gets rid of the checked-in extra
lock files that took forever to generate.
2024-06-10 17:03:58 +02:00
Cornelius Riemenschneider
6731bccc92 C#: Provide skeleton to generate an assemblyInfo file.
Each unit gets a unique assemblyInfo file, on top
of the ones for entrypoints that also gets the git info embedded.
2024-06-07 15:24:53 +02:00
Paolo Tranquilli
61847bc58b Ripunzip: provide installer 2024-06-05 14:46:59 +02:00
Paolo Tranquilli
e693c2719d Kotlin: remove unneeded patch 2024-06-04 14:39:02 +02:00
Paolo Tranquilli
d1a2c0fbe4 Merge branch 'main' into redsun82/kotlin 2024-06-04 08:48:52 +02:00
Cornelius Riemenschneider
b9da01a384 Merge remote-tracking branch 'origin/main' into criemen/new-pkg 2024-06-03 15:47:15 +02:00
Cornelius Riemenschneider
5875ec272d Merge pull request #16627 from github/criemen/pkg-fix-install
`pkg.bzl`: Fix install targets.
2024-06-03 15:31:43 +02:00
Paolo Tranquilli
8479673419 Bazel: ignore non-default SSH endpoints in git_lfs_probe.py 2024-06-03 12:26:37 +02:00
Cornelius Riemenschneider
a42bdd9bb0 Update misc/bazel/pkg.bzl
Co-authored-by: Paolo Tranquilli <redsun82@github.com>
2024-06-03 10:53:08 +02:00
Cornelius Riemenschneider
cff78cca5e Cmake generator: Remove space in argument.
This space breaks when upgrading bazelisk on Windows.
Somehow, a space inside the argument messes up some argument-parsin
somewhere. Porbably due to Windows argument parsing
being not well-defined in how it splits a string into argv.
Removing the space works around the problem.

If the space is included, cmake suddenly can't find the bazelisk
binary anymore, despite happily executing `info output_base` earlier.
2024-06-02 23:56:31 +02:00
Paolo Tranquilli
25ab1a934d Merge branch 'main' into redsun82/bazel-fix 2024-05-31 14:03:20 +02:00
Cornelius Riemenschneider
14988002fa Address review. 2024-05-31 12:35:03 +02:00
Paolo Tranquilli
07f4288e1f Fix zipmerge build and test 2024-05-31 12:12:58 +02:00
Paolo Tranquilli
8e26f64f89 Bazel: fix non-swift macOS builds
This is meant to be cleaned up in a later PR with respect to the TODOs.
2024-05-31 11:49:36 +02:00
Cornelius Riemenschneider
e2cb5631d9 pkg.bzl: Fix install targets.
First, the labels used in this file need to be wrapped in `Label`,
so that we can use the installer target from the internal repo.
Second, when unpacking zips, the path passed to `ripunzip` included a trailing
`\n`, which caused `ripunzip` to fail.
2024-05-30 21:06:46 +02:00
Cornelius Riemenschneider
e43b773d7c Fix comment to indicate the correct order in the zip dict. 2024-05-30 17:58:22 +02:00
Cornelius Riemenschneider
d66d7d8a3a C#: Move to new packaging rules. 2024-05-30 14:25:16 +02:00
Cornelius Riemenschneider
60b5317c5f C++: Move to new packaging rules. 2024-05-30 14:25:15 +02:00
Cornelius Riemenschneider
9f3310d3d2 pkg.bzl: Add features to support the nolang dist.
In order to build the language-independent parts of our dist with `pkg.bzl`,
we need two override features:
* A way to set the prefix in the zip files to the empty string, so that our top-level files
  stay top-level.
* A way to put `codeql.exe` into the arch-specific zip, despite it not being under `CODEQL_PLATFORM`.
This PR implements both.
2024-05-30 13:03:57 +02:00
Paolo Tranquilli
2606d3f6d1 Reapply "Bazel: add codeql specific packaging library"
This reverts commit 31d6b9be4d.
2024-05-29 15:46:29 +02:00
Paolo Tranquilli
31d6b9be4d Revert "Bazel: add codeql specific packaging library" 2024-05-29 15:27:10 +02:00
Paolo Tranquilli
336ec089cc Bazel: use extend(...) instead of += list(...) 2024-05-29 12:02:02 +02:00
Paolo Tranquilli
e8061ecd38 Bazel: fix _zipmerge rule 2024-05-29 11:59:18 +02:00
Paolo Tranquilli
5672ddf8f3 Fix bazel formatting 2024-05-29 09:53:31 +02:00
Paolo Tranquilli
fbe1b56f2d Zipmerge: link test statically 2024-05-29 08:55:06 +02:00
Paolo Tranquilli
332d178298 Zipmerge: allow test to be run from internal repo 2024-05-28 17:37:34 +02:00
Paolo Tranquilli
45f1fdfaff Bazel: extract pack filtering logic out of _zipmerge 2024-05-28 17:24:20 +02:00
Paolo Tranquilli
5eb12b8503 Zipmerge: substitute stripped down slf4j jars with dummy ones 2024-05-28 16:15:20 +02:00
Paolo Tranquilli
c3ccf4d5a3 Zipmerge: substitute CPython archives with dummy ones 2024-05-28 15:47:24 +02:00
Paolo Tranquilli
67d622fa9d Bazel: actually run the zipmerge tests 2024-05-28 15:44:53 +02:00
Paolo Tranquilli
9c1efb9f0e Bazel: expose compression_level in codeql_pack 2024-05-28 15:09:15 +02:00
Paolo Tranquilli
00ed00e1e5 Bazel: avoid unneeded operations if no imported zips are present 2024-05-28 15:01:35 +02:00
Paolo Tranquilli
e2206e62d6 Bazel: restrict codeql_pack zips to .zip files 2024-05-28 14:39:20 +02:00
Paolo Tranquilli
6b971617e7 Bazel: rename _process_path to _expand_path, and make its use clearer 2024-05-28 14:17:05 +02:00
Paolo Tranquilli
76fbb522d2 Bazel: use pack name for zip file name 2024-05-28 14:10:31 +02:00
Paolo Tranquilli
6d798410ce Bazel: add --no-cleanup to installer script 2024-05-28 12:51:52 +02:00
Paolo Tranquilli
a8543d4a88 Zipmerge: port tests from internal repo 2024-05-28 12:01:57 +02:00
Paolo Tranquilli
392ef09d19 Zipmerge: make lib public for internal testing 2024-05-27 17:28:33 +02:00
Paolo Tranquilli
cde71a915b Bazel: address review comments 2024-05-27 17:00:39 +02:00
Paolo Tranquilli
2f95944244 Bazel: add documentation to install.py 2024-05-27 16:58:58 +02:00
Paolo Tranquilli
2f53c0e640 Bazel: fix codeql_pack installation on Windows 2024-05-27 16:09:42 +02:00
Paolo Tranquilli
821bd1f27b Merge branch 'main' into redsun82/kotlin 2024-05-27 13:17:06 +02:00
Paolo Tranquilli
2bec696114 Merge branch 'main' into redsun82/pkg 2024-05-27 13:13:12 +02:00
Cornelius Riemenschneider
735bea624a Place the C++ autobuilder in the correct path. 2024-05-27 11:55:14 +02:00
Paolo Tranquilli
0b7a4257d7 Bazel: use {CODEQL_PLATFORM} as discriminant between arch and generic contents 2024-05-27 10:31:19 +02:00
Paolo Tranquilli
5d4b61c365 Bazel: replace prebuilt ripunzip from workflow 2024-05-24 17:44:39 +02:00