Commit graph

115 commits

Author SHA1 Message Date
Dennis Felsing 6dc0abf7a2 ci: Install Rust on macOS
Fixes: #8631
2024-07-23 00:36:08 +02:00
ChillerDragon c75584406a Use shfmt as formatter for shell scripts 2024-05-23 08:05:00 +08:00
Dennis Felsing 6cffcd07aa Remove unused gcov flags
Fixes: #8247
2024-04-23 10:33:24 +08:00
Zwelf 2eb4a50d4d Add check for correct finish time in integration_test.sh
ALso exclude coverage.map from twmap-checker due to using tele
checkpoints without matching tele checkpoints to test physics.

Disable exact checks on valgrind. Only require at least one finish.
2024-04-21 23:24:16 +02:00
Dennis Felsing d5359b2c11 Try older Ubuntu version for clang sanitizer 2024-03-16 12:15:56 +01:00
Dennis Felsing b0e9f5172d Try to fix python macOS issue
Fixes: #8053
2024-03-03 23:18:38 +01:00
MilkeeyCat b6c75e122c ci: remove useless command in ci 2024-02-26 10:48:47 +02:00
Edgar 0e0ebe9aea
update ci actions, update rust edition to 2021 since our MSRV covers it 2024-02-25 15:55:10 +01:00
heinrich5991 9e9da7db28 Set MSRV to Rust 1.63.0 2024-01-05 18:54:16 +01:00
Robert Müller e7f4be1023 Remove unnecessary rustup default 1.48.0 in non-fancy Linux CI
The old default version causes linking errors for the tests in the non-fancy Linux CI, i.e. with Ubuntu 20.04.
2023-11-26 17:57:17 +01:00
Dennis Felsing cfced55534 Fix macOS CI
Seen in https://github.com/ddnet/ddnet/actions/runs/6969106161/job/18964960431

Error: No such keg: /usr/local/Cellar/python@3.10
2023-11-23 13:20:41 +01:00
Dennis Felsing 5ea8a0f872 Try to fix code coverage upload (fixes #6277)
[2023-01-12T17:25:29.471Z] ['error'] There was an error running the uploader: No gcov files found

Broken in https://github.com/ddnet/ddnet/pull/5599 because the
cmake-init-env overwrites outside env variables
2023-11-18 23:15:15 +01:00
Robert Müller db17539652 Rewrite unused header style check shell script in Python
As the shell script is pretty slow, taking roughly 84 seconds in the CI, whereas the equivalent Python script takes only 1 second.
2023-10-14 15:21:28 +02:00
Robert Müller eb880bc192 Also apply Cargo CI workaround to style workflow
Since the style workflow also uses cargo, we should also set the property `CARGO_HTTP_MULTIPLEXING: false` to hopefully fix the spurious network errors.

See #7173.
2023-09-18 16:31:16 +02:00
heinrich5991 14dc6b3e70 Hopefully fix intermittent CI failures
Thanks to @Robyt3 for the solution.

https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation
https://github.com/serde-rs/serde/issues/2577
https://github.com/dtolnay/rust-toolchain/pull/94
2023-09-12 21:22:17 +02:00
Alexander Akulich a9157e8385 CI: Move ASan/UBSan to own build directory 2023-09-08 00:10:48 +03:00
heinrich5991 c01594cd30 CI: Cache Rust dependencies 2023-08-23 17:35:28 +02:00
heinrich5991 a2dd529e40 Use lock file for dependencies
This makes breakages like in #6863 less likely.
2023-07-16 12:22:51 +02:00
Dennis Felsing 9f43fd2247 Fix twmap installation in CI
error: failed to compile `twmap-tools v0.3.1 (/home/runner/work/ddnet/ddnet/twmap/twmap-tools)`, intermediate artifacts can be found at `/home/runner/work/ddnet/ddnet/twmap/target`

Caused by:
  package `half v2.3.1` cannot be built because it requires rustc 1.70 or newer, while the currently active rustc version is 1.69.0
  Either upgrade to rustc 1.70 or newer, or use
  cargo update -p half@2.3.1 --precise ver
  where `ver` is the latest version of `half` supporting rustc 1.69.0
2023-07-15 11:30:15 +00:00
heinrich5991 4838c10f81 Don't run status checks on GitHub merge queue state twice 2023-07-14 11:28:56 +00:00
Edgar 01ec7adce2
Merge pull request #6848 from heinrich5991/pr_ddnet_rm_bors
Remove last traces of bors
2023-07-14 10:41:59 +00:00
heinrich5991 6de3184d55 Remove last traces of bors
Farewell, you've served use well.

CC #6558
2023-07-14 12:17:48 +02:00
heinrich5991 94f45d4689 Enable GitHub merge queue
Run workflows for GitHub merge queue.

Fixes #6558.
2023-07-14 11:46:22 +02:00
Robert Müller 4dd647b521 Add script to check for unused config variables to CI
Add `scripts/check_config_variables.py` which checks if config variables defined in `src/game/variables.h` and `src/engine/shared/config_variables.h` are unused.
2023-06-01 20:25:41 +02:00
Robert Müller ec965d7d0b Show ASan/UBSan logs in CI also for unit and integration tests
The ASan/UBSan logs are currently only printed in the CI log when launching the client and server once.

Now the logs are also printed when the unit or integration tests fail due to a sanitizer crash.

A redundant definition of an environment variable is removed.
2023-05-13 18:33:56 +02:00
bors[bot] 0f5d4d8bec
Merge #6372
6372: Check in CI that no C standard headers are used, replace all usages of C standard headers with C++ headers, replace usages of C math functions r=def- a=Robyt3

Closes #6334.

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: Robert Müller <robytemueller@gmail.com>
2023-03-01 22:34:26 +00:00
Robert Müller 69e95fbb5b Fix warning in CI when cloning twmap from GitLab
`warning: redirecting to https://gitlab.com/Patiga/twmap.git/`
2023-03-01 21:10:34 +01:00
Robert Müller cf4da09ce9 Check in CI that no C standard headers are used
Add `scripts/check_standard_headers.sh` to check that no C standard header is included in our code. The script prints an error message for every C header used as well as the corresponding C++ header that should be used instead.

The script is added to the style checking CI.
2023-03-01 19:26:51 +01:00
heinrich5991 cf43d6d8ff Verify that absolute imports are done using #include <> in CI 2023-02-23 11:05:01 +01:00
def e206942e95 Fix ubuntu workflow (fixes #6341) 2023-02-17 22:58:22 +01:00
Robert Müller 79e651886f Fix map check excluded warnings in CI
Due to changes in wording of the error messages, some of the twmap-check-ddnet warnings were no longer suppressed.

Closes #6305.
2023-01-25 18:26:22 +01:00
def 6691be1d90 Run unit tests with sanitizers (fixes #6205)
Also fix memory leak in Net.Ipv4AndIpv6Work

Rust tests fail to link when building in san directory, works in source
directory.
2022-12-30 23:35:22 +01:00
def 464cbbb8ae Try to fix macOS CI failure again
==> Pouring python@3.11--3.11.1.big_sur.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink bin/2to3-3.11
Target /usr/local/bin/2to3-3.11
already exists. You may want to remove it:
  rm '/usr/local/bin/2to3-3.11'

To force the link and overwrite all conflicting files:
  brew link --overwrite python@3.11

To list all files that would be deleted:
  brew link --overwrite --dry-run python@3.11
2022-12-25 01:10:24 +01:00
Dennis Felsing 7c1c934c1b Fix macOS CI with existing 2to3 binary 2022-12-16 16:38:14 +01:00
Dennis Felsing c291fe7eb9 Try using default MariaDB server version (fixes #6079) 2022-12-01 23:38:04 +01:00
bors[bot] b21ba35225
Merge #5599
5599: Add support for Rust code in DDNet r=def- a=heinrich5991

The glue is done using the [cxx crate](https://cxx.rs/) on the Rust side.

As a proof-of-concept, only a small console command (`rust_version`) printing the currently used Rust version was added.

You can generate and open the Rust documentation using `DDNET_TEST_NO_LINK=1 cargo doc --open`.

You can run the Rust tests using `cmake --build <build dir> --target run_rust_tests`, they're automatically included in the `run_tests` target as well.

Rust tests don't work on Windows in debug mode on Windows because Rust cannot currently link with the debug version of the C stdlib on Windows: https://github.com/rust-lang/rust/issues/39016.

---

The stuff in `src/rust-bridge` is generated using
```
cxxbridge src/engine/shared/rust_version.rs --output src/rust-bridge/engine/shared/rust_version.cpp --output src/rust-bridge/engine/shared/rust_version.h
cxxbridge src/engine/console.rs --output src/rust-bridge/cpp/console.cpp --output src/rust-bridge/cpp/console.h
```

Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
2022-11-06 21:40:48 +00:00
Dennis Felsing 05a18ed8fe Fix dmgbuild issue by adding binary install directory to PATH (fixes #6005) 2022-11-04 18:46:50 +01:00
Rafael Fontenelle 80292a263e Update actions versions 2022-10-25 08:50:49 -03:00
heinrich5991 dcd76fd3e1 Add support for Rust code in DDNet
The glue is done using the [cxx crate](https://cxx.rs/) on the Rust
side.

As a proof-of-concept, only a small console command (`rust_version`)
printing the currently used Rust version was added.

You can generate and open the Rust documentation using
`DDNET_TEST_NO_LINK=1 cargo doc --open`.

You can run the Rust tests using `cmake --build <build dir> --target
run_rust_tests`, they're automatically included in the `run_tests`
target as well.

Rust tests don't work on Windows in debug mode on Windows because Rust
cannot currently link with the debug version of the C stdlib on Windows:
https://github.com/rust-lang/rust/issues/39016.

---

The stuff in `src/rust-bridge` is generated using
```
cxxbridge src/engine/shared/rust_version.rs --output src/rust-bridge/engine/shared/rust_version.cpp --output src/rust-bridge/engine/shared/rust_version.h
cxxbridge src/engine/console.rs --output src/rust-bridge/cpp/console.cpp --output src/rust-bridge/cpp/console.h
```
2022-10-19 23:46:06 +02:00
heinrich5991 1b114b2565 Only pass CXXFLAGS to initial cmake 2022-10-19 22:21:48 +02:00
heinrich5991 be29ef2691 Remove unneeded CFLAGS variable
We don't have C source files anymore.
2022-10-19 22:21:48 +02:00
bors[bot] fba7211740
Merge #5905
5905: Update Tutorial map by unique_2 r=heinrich5991 a=def-

> We made a small update of the tutorial map because of the new freeze
> graphics. We also made the teleport tiles the airjump hints
> consistent. Idk how updating the map works on your end, ideally
> everyone keeps their time because the changes don't influence anyone's
> times.

<!-- What is the motivation for the changes of this pull request? -->

<!-- Note that builds and other checks will be run for your change. Don't feel intimidated by failures in some of the checks. If you can't resolve them yourself, experienced devs can also resolve them before merging your pull request. -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
2022-10-10 19:53:37 +00:00
def 97965ee4fd Also check if translations are out of date (not enabled yet) 2022-10-05 09:58:40 +02:00
def 72bc3c9f00 Update Tutorial map by unique_2
> We made a small update of the tutorial map because of the new freeze
> graphics. We also made the teleport tiles the airjump hints
> consistent. Idk how updating the map works on your end, ideally
> everyone keeps their time because the changes don't influence anyone's
> times.

Update LearnToPlay with new time cp version

Also check maps in CI using Patiga's twmap-check-ddnet tool.
2022-10-03 10:17:13 +02:00
def 89739ef1b6 Set coverage flags to separate coverage (fixes #5898)
https://docs.codecov.com/docs/flags
2022-10-01 14:31:20 +02:00
def f2c10eed6d Try code coverage (fixes #5873) 2022-09-25 13:21:06 +02:00
Chiller Dragon 26a108063f
Shellcheck Unused headers CI 2022-08-21 10:45:02 +02:00
def 1e47c280b2 Automatically detect unused header files 2022-07-31 09:44:50 +02:00
Dennis Felsing 2d3d0f50c7 Switch to using pip-installed pylint (fixes #5483) 2022-07-27 09:37:25 +02:00
def 7379a64004 [WIP] Require Python 3.6 (f-strings) and fix pylints
So far only done scripts directory, will do the rest if this is
considered good
2022-07-27 09:37:24 +02:00