Commit Graph

504 Commits

Author SHA1 Message Date
Tom Hvitved
f7fc61e39d Merge pull request #11336 from hvitved/ruby/ci-check-undefined-labels
Ruby: Add `--check-undefined-labels` to QL test job
2022-11-21 13:36:52 +01:00
AlexDenisov
6f52fe81d1 Merge pull request #11331 from github/redsun82/swift-codegen-skip-unchanged
Swift: skip QL code generation on untouched files
2022-11-21 13:34:41 +01:00
Tom Hvitved
1dbcf8eb10 Ruby: Add --check-undefined-labels to QL test job 2022-11-20 10:16:35 +01:00
erik-krogh
41e8170d59 delete the rest of the qlcompile job in Ruby 2022-11-19 11:16:24 +01:00
Paolo Tranquilli
2cd58817d7 Swift: skip QL code generation on untouched files
This is a developer QoL improvement, where running codegen will skip
writing (and especially formatting) any files that were not changed.

**Why?** While code generation in itself was pretty much instant, QL
formatting of generated code was starting to take a long time. This made
unconditionally running codegen quite annoying, for example before each
test run as part of an IDE workflow or as part of the pre-commit hook.

**How?** This was not completely straightforward as we could not work
with the contents of the file prior to code generation as that was
already post-processed by the QL formatting, so we had no chance of
comparing the output of template rendering with that. We therefore store
the hashes of the files _prior_ to QL formatting in a checked-in file
(`swift/ql/.generated.list`). We can therefore load those hashes at
the beginning of code generation, use them to compare the template
rendering output and update them in this special registry file.

**What else?** We also extend this mechanism to detect accidental
modification of generated files in a more robust way. Before this patch,
we were doing it with a rough regexp based heuristic. Now, we just store
the hashes of the files _after_ QL formatting in the same checked file,
so we can check that and stop generation if a generated file was
modified, or a stub was modified without removing the `// generated`
header.
2022-11-18 16:56:01 +01:00
erik-krogh
3cdfed9483 CI: delete language specific codeql query compile checks 2022-11-18 14:41:29 +01:00
erik-krogh
7c091fa6cd also compile the examples folders as part of the compilation check 2022-11-18 10:31:42 +01:00
Erik Krogh Kristensen
45d4318e0e Merge pull request #11272 from erik-krogh/clean-cache
CI: clean up the cache when compiling on main
2022-11-17 10:37:08 +01:00
erik-krogh
e4b0d8dbf3 simplify the copy-logic, because cp -r actually creates the folders 2022-11-16 16:10:41 +01:00
Paolo Tranquilli
d4f3e38062 Swift: fix path of generated C++ files artifact 2022-11-16 09:49:57 +01:00
erik-krogh
65c1e239eb clean up the cache when compiling on main 2022-11-15 14:49:06 +01:00
Alex Denisov
b5400f6dc9 Swift: remove rebase artifact 2022-11-14 08:55:44 +01:00
Alex Denisov
d49015a7e6 Swift: infrastructure for upgrade/downgrade scripts 2022-11-11 15:51:23 +01:00
erik-krogh
03a479fd60 use find in the format check to fix it 2022-11-11 10:50:42 +01:00
erik-krogh
866e92558c broaden the file pattern used in the format check to ensure js-ml is included 2022-11-10 17:57:45 +01:00
erik-krogh
fbb2dcf7a8 remove langauge specific format checks 2022-11-10 17:47:14 +01:00
erik-krogh
a2ce764c82 update codeql-action version used in QL-for-QL, as the old version still used the deprecated set-output feature 2022-11-10 13:58:07 +01:00
erik-krogh
ac32f27fdc don't use the deprecated set-output feature in github-actions 2022-11-10 13:49:29 +01:00
erik-krogh
5ba694e909 remember to run on PRs 2022-11-09 14:55:08 +01:00
erik-krogh
57ad491356 adjust the triggers, run on all PRs, and more branches 2022-11-09 14:50:53 +01:00
erik-krogh
8d51aaa403 add another fallback to main 2022-11-09 14:44:10 +01:00
erik-krogh
7e522770f6 simplify the cache keys 2022-11-09 14:43:30 +01:00
erik-krogh
1b9653827f do a quicker merge-base calculation 2022-11-09 14:38:55 +01:00
erik-krogh
53917e506e add refs/heads/ to make the ref fully-formed 2022-11-09 12:58:31 +01:00
erik-krogh
f0b09ee16c fallback to main 2022-11-09 12:55:21 +01:00
erik-krogh
b3b13bdd43 use base_ref to calculate the cache-keys when running in a PR. 2022-11-09 12:55:02 +01:00
erik-krogh
aede9c3467 support general base-branches, not just main 2022-11-09 11:55:19 +01:00
erik-krogh
484dc4ad3a restore from another cache when running on main. Otherwise that workflow always takes an hour 2022-11-09 11:45:21 +01:00
Erik Krogh Kristensen
8b11e98d42 Merge pull request #11162 from erik-krogh/ciCache
CI: try only to fill the compilation cache from main in the compile-queries workflow
2022-11-08 19:24:14 +01:00
Paolo Tranquilli
d325a42890 Swift: print unextracted entities 2022-11-08 15:38:53 +01:00
erik-krogh
22d7f3cfe5 try only to fill the cache from main 2022-11-08 15:06:00 +01:00
Henry Mercer
b32f4b844a Merge pull request #11118 from github/henrymercer/atm-check-queries-improvements
ATM: Miscellaneous improvements for the check queries workflow
2022-11-04 18:04:32 +00:00
Erik Krogh Kristensen
418d632738 Merge pull request #11123 from erik-krogh/stableCI-followup-2
fix typo in compile-queries workflow
2022-11-04 15:48:27 +01:00
Paolo Tranquilli
0370d1a1ba Merge pull request #11008 from github/redsun82/swift-macos-integration-tests
Swift: rework workflows
2022-11-04 15:44:42 +01:00
erik-krogh
def9b5e2ce fix typo in compile-queries workflow 2022-11-04 13:58:29 +01:00
Henry Mercer
cbbff0c401 ATM: Rename workflow
Rename to take into account us now checking the results of the query
suite too.
2022-11-04 11:51:35 +00:00
Henry Mercer
87f7b65052 ATM: Check the results of the queries too 2022-11-04 11:51:35 +00:00
Erik Krogh Kristensen
91b33f72b5 update name and comment to reflect that it also runs on rc branches 2022-11-04 12:50:18 +01:00
Henry Mercer
05dd161d76 ATM: Use database analyze to check results interpretation too 2022-11-04 10:54:08 +00:00
Henry Mercer
7976d746b6 ATM: Simplify DB path definition and improve quoting 2022-11-04 10:49:25 +00:00
Henry Mercer
35a4d31519 ATM: Fix naming of query pack 2022-11-04 10:46:06 +00:00
Henry Mercer
f558e858e7 ATM: Install codeql using new input to fetch-codeql Action 2022-11-04 10:44:14 +00:00
erik-krogh
47289a4d33 fix merge-base compilation when running directly on main 2022-11-04 11:28:56 +01:00
erik-krogh
83a8b1afb8 use fetch-codeql action 2022-11-03 13:49:15 +01:00
erik-krogh
fc811bd33d add workflow that checks compilation of all queries with the latest stable release 2022-11-03 11:20:12 +01:00
Paolo Tranquilli
7e0a7d8b71 Swift: fix third-party action commit 2022-11-03 09:20:58 +01:00
Paolo Tranquilli
73131cef9e Merge branch 'main' into redsun82/swift-macos-integration-tests 2022-11-03 09:19:07 +01:00
Paolo Tranquilli
17012c1a45 Swift: fix workflow job dependencies 2022-11-02 14:35:23 +01:00
Paolo Tranquilli
e6d4685109 Swift: split quick tests in separate action
Also, make the quick test list explicit in the action code, so we can
catch an inadvertant test deletion.
2022-11-02 14:32:45 +01:00
Jean Helie
37869e816b Merge pull request #11067 from github/jhelie/add-atm-model-integration-tests-hello-world
ATM: add hello world workflow for development of model integration te…
2022-11-02 14:20:51 +01:00