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
491e3a44be
Merge branch 'main' into redsun82/pkg
2024-05-29 08:55:48 +02:00
Paolo Tranquilli
fbe1b56f2d
Zipmerge: link test statically
2024-05-29 08:55:06 +02:00
github-actions[bot]
906b65d09c
Post-release preparation for codeql-cli-2.17.4
2024-05-28 18:02:25 +00:00
github-actions[bot]
33b4ae8bbb
Release preparation for version 2.17.4
2024-05-28 15:44:32 +00: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
6bbad22672
Codegen: make codegen work on windows
2024-05-27 16:05:38 +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
Cornelius Riemenschneider
d30ed54bfd
Merge branch 'main' into criemen/bazel-csharp
2024-05-24 18:02:20 +02:00
Paolo Tranquilli
5d4b61c365
Bazel: replace prebuilt ripunzip from workflow
2024-05-24 17:44:39 +02:00
Paolo Tranquilli
b9064c5446
Bazel: fail install on `ripunzip` failing
2024-05-24 15:50:16 +02:00
Paolo Tranquilli
e990d75a8f
Bazel: use codeql platform as arch zip filename
2024-05-24 15:23:51 +02:00
Paolo Tranquilli
fa2c626e49
Bazel: add fat macOS ripunzip binary
2024-05-24 14:29:02 +02:00
Paolo Tranquilli
dcbf42d29c
Bazel: reorganize LFS files and add licensing information
2024-05-24 14:26:22 +02:00
Paolo Tranquilli
8e132e90cc
Bazel: add executable attribute to `lfs_files`
2024-05-24 12:35:17 +02:00
Paolo Tranquilli
e8b857b79e
Bazel/Swift: add zip imports to packs
2024-05-24 12:18:42 +02:00
Paolo Tranquilli
4d93e8a732
Bazel: move codeql packaging rules away from some macros
2024-05-24 10:27:45 +02:00
Paolo Tranquilli
60cf77be7e
Bazel: add codeql specific packaging library
...
This encapsulate arch specific logic, local installation and separation
of zip files into generic and arch-specific parts as required by the
internal build.
2024-05-24 10:27:44 +02:00
Dave Bartolomeo
613ccaac1d
Add change note to all v1.0.0 packs
2024-05-23 13:01:22 -04:00
Dave Bartolomeo
ffe4c8c87b
Update all pack versions to `1.0.0`
2024-05-22 13:39:08 -04:00
Paolo Tranquilli
eab940c45d
Merge branch 'main' into redsun82/kotlin
2024-05-22 13:30:23 +02:00
Cornelius Riemenschneider
24a14badbb
Bazel: Remove some kwargs.pop invocations.
2024-05-22 12:09:18 +02:00
Paolo Tranquilli
b744f9fab9
Merge pull request #16544 from github/redsun82/bazel-csharp-2
...
Bazel/C#: avoid zipmerge
2024-05-22 08:18:30 +02:00
Paolo Tranquilli
3c52e3b7c5
Bazel/C#: adjust `DefaultInfo` in `codeql_pkg_files_overlay`
2024-05-21 16:32:24 +01:00
Cornelius Riemenschneider
767d427c1b
C#: Re-implement the git version logic using an attribute.
2024-05-21 17:28:31 +02:00
Paolo Tranquilli
b19bf2f37a
Bazel/C#: avoid zipmerge
2024-05-21 15:29:54 +01:00
Cornelius Riemenschneider
36922f2625
Remove GitInfo dependency.
...
GitInfo doesn't work with the bazel-based build.
Instead, we pull in the information from bazel,
which correctly works with the bazel cache.
2024-05-21 09:14:14 +02:00
Cornelius Riemenschneider
71372bc74c
C#: Add Bazel-based build system.
...
This commits a bazel-based build system for C#
using `rules_dotnet`. External dependencies are managed
via `paket`, and updates to the generated bazel files
are done via `./update-deps.sh`.
We're providing our own (minimal) test runner for `xunit`
tests.
2024-05-21 09:14:13 +02:00
Paolo Tranquilli
d01d657f89
Bazel: accept new SSH keys in `git_lfs_probe.py`
2024-05-17 16:39:18 +01:00
Paolo Tranquilli
170e2231d4
Bazel: allow LFS rules to use cached downloads without internet
...
If the cache is prefilled, LFS rules were still trying to query LFS
urls.
Now the strategy is to first try to fetch the files from the repository
cache (which is possible by providing an empty url list and `allow_fail`
to `repository_ctx.download`), and only run the LFS protocol if that
fails. Technically this is possible by enhancing `git_lfs_probe.py` with
a `--hash-only` flag.
This is also an optimization where no uneeded access is done (including
the slightly slow SSH call) if the repository cache is warm.
2024-05-17 16:24:38 +01:00
Paolo Tranquilli
75709bf1ec
Merge branch 'main' into redsun82/kotlin
2024-05-16 15:55:08 +01:00
github-actions[bot]
32e8b5c667
Post-release preparation for codeql-cli-2.17.3
2024-05-14 21:14:08 +00:00
github-actions[bot]
100166fa53
Release preparation for version 2.17.3
2024-05-14 19:23:18 +00:00
Óscar San José
9105faa3fd
make sure GITHUB_TOKEN exists and is not empty before using it in auth headers
2024-05-14 11:22:07 +02:00
Óscar San José
faa2dcee24
test GITHUB_TOKEN non-emptyness before using it in auth headers
2024-05-14 11:18:18 +02:00
Óscar San José
5b572a2c2a
make GITHUB_TOKEN in lfs_probe a fallback rather than an override
2024-05-14 10:24:02 +02:00
Rasmus Wriedt Larsen
24f8b5f203
misc: Fix docstring warning
...
When using a sufficiently new version of Python, it will give a warning
about the escape sequence `\_` in `¯\_(ツ)_/¯` not being a valid escape
:D fix is to make the docstring a raw string.
Thanks @owen-mc
2024-05-08 13:56:11 +02:00
Paolo Tranquilli
9f27eb3eda
Bazel: make `git_lfs_probe.py` compatible with python 3.8
2024-05-07 12:44:28 +02:00
Paolo Tranquilli
239b6d8c8e
Merge branch 'main' into redsun82/kotlin
2024-05-06 17:24:53 +02:00
Paolo Tranquilli
d85f81d699
Merge pull request #16435 from github/redsun82/buildifier
...
Bazel: move buildifier out of root `BUILD`
2024-05-06 16:41:25 +02:00
Paolo Tranquilli
92b3eda12d
Bazel: move buildifier out of root `BUILD`
...
See https://github.com/github/codeql/pull/16428 for details as to why
this is necessary.
2024-05-06 16:00:05 +02:00
Paolo Tranquilli
54c9aea251
Bazel: fix lfs lazy rule when all objects are local
2024-05-06 15:47:43 +02:00
Paolo Tranquilli
880262d462
Merge pull request #16393 from github/redsun82/lfs
...
Bazel: improved lazy lfs files
2024-05-03 12:37:41 +02:00
Paolo Tranquilli
6cbe16e0c2
Bazel: add progress reporting
2024-05-03 12:00:15 +02:00
Paolo Tranquilli
ecdf62376d
Bazel: clean up `git_lfs_probe.py`
2024-05-03 09:21:57 +02:00
Paolo Tranquilli
daea674095
Bazel: cover standard `https` git credentials in `git_lfs_probe.py`
2024-05-02 18:02:22 +02:00
Rasmus Wriedt Larsen
ccad70897d
Add `--dont-wait` option
2024-05-02 15:39:07 +02:00
Rasmus Wriedt Larsen
3239af9973
Handle multiple job failure URLs
...
CI has changed how jobs are being run 🤷
2024-05-02 15:31:56 +02:00
Rasmus Wriedt Larsen
2cff081f2b
Minor fixes to CI script.
...
I had problems with proper resolution of codeql_repo_dir with old python installation, this fixes it
2024-05-02 15:13:50 +02:00
Paolo Tranquilli
9157dee0db
Bazel: integrate `download_and_extract` into `lfs_smudge`
2024-05-02 08:53:51 +02:00
Paolo Tranquilli
677520aa8e
Bazel: improved lazy lfs files
...
This reintroduces lazy lfs file rules that were removed in
https://github.com/github/codeql/pull/16117 , now improved.
The new rules will make the actual file download go through bazel's
download manager, which includes:
* caching into the repository cache
* sane limiting of concurrent downloads
* retries
The bulk of the work is done by `git_lfs_probe.py`, which will use the
LFS protocol (with authentication via SSH) to output short lived
download URLs that can be consumed by `repository_ctx.download`.
2024-05-02 06:38:26 +02:00
Henry Mercer
797f675285
Merge pull request #16365 from github/post-release-prep/codeql-cli-2.17.2
...
Post-release preparation for codeql-cli-2.17.2
2024-04-30 14:51:01 +01:00
github-actions[bot]
99928b82ed
Post-release preparation for codeql-cli-2.17.2
2024-04-30 12:15:35 +00:00
Rasmus Wriedt Larsen
377c6b4cc8
Merge pull request #12557 from felickz/patch-1
...
add security-severity score to code scanning query list
2024-04-30 13:48:22 +02:00
github-actions[bot]
5228d94d42
Release preparation for version 2.17.2
2024-04-30 10:25:51 +00:00
Paolo Tranquilli
52a015fb11
Bazel: remove further unneeded files
2024-04-30 09:07:11 +02:00
Paolo Tranquilli
a28f87fff0
Bazel: add empty registry override
...
This will unblock work in parallel on two separate PRs that require
patching different modules.
2024-04-29 18:01:09 +02:00
Paolo Tranquilli
450f6518e2
Bazel: remove generic lazy lfs files
2024-04-29 17:26:48 +02:00
Paolo Tranquilli
1e622e168c
Merge branch 'main' into redsun82/kotlin
2024-04-25 11:05:19 +02:00
Paolo Tranquilli
9f5782b67b
Bazel: introduce buildifier formatting
...
This introduces tooling and enforcement for formatting bazel files.
The tooling is provided as a bazel run target from
[keith/buildifier-prebuilt](https://github.com/keith/buildifier-prebuilt ).
This is used in a [`pre-commit`](https://pre-commit.com/ ) hook for those
having that installed. In turn this is used in a CI check. Relying on a
`pre-commit` action gives us easy checking that buildifying did not
change anything in the files and printing the diff, without having to
hand-roll the check ourselves.
This enforcement will make usage of gazelle easier, as gazelle itself
might reformat files, even outside of `go`. Having them properly
formatted will allow gazelle to leave them unchanged, without needing
to configure awkward exclude directives.
2024-04-24 15:49:48 +02:00
Paolo Tranquilli
3678e51f0b
Merge branch 'main' into redsun82/kotlin
2024-04-17 15:09:27 +02:00
Alexander Eyers-Taylor
da3fa22cbd
Merge pull request #16228 from github/post-release-prep/codeql-cli-2.17.1
...
Post-release preparation for codeql-cli-2.17.1
2024-04-17 11:24:34 +01:00
Chad Bentz
f77f91ef49
move security-severity to end of column list in csv
...
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
2024-04-16 16:02:15 -04:00
Paolo Tranquilli
c5f6c65ff1
Merge branch 'main' into redsun82/kotlin
2024-04-16 18:23:33 +02:00
Cornelius Riemenschneider
6ba27dc863
Upgrade rules_pkg to 0.10.1.
2024-04-16 16:29:56 +02:00
github-actions[bot]
622e176a16
Post-release preparation for codeql-cli-2.17.1
2024-04-16 14:21:32 +00:00
Paolo Tranquilli
aee3c0d249
Add license and notice information to patched registry
2024-04-16 12:33:00 +02:00