Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the eval-pr scripts and docs to match #2242

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/Contributing/dev-env.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ On Linux, the easiest way to install KDevelop is with a command such as this:

.. code-block:: sh

$ sudo apt install kdevelop
$ sudo apt install kdevelop clang-format-11


Once installed, you can then import the Freeciv21 project into it. Follow these steps:
Expand Down
23 changes: 11 additions & 12 deletions docs/Contributing/eval-pull-request.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,23 @@ This page assumes the user knows how to use :file:`git`, compile Freeciv21 and u

.. code-block:: sh

$ rm -Rf build
$ rm -Rf build_[pr-number]


:strong:`Configure And Compile The Code`

.. code-block:: sh

$ cmake . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=$PWD/build/install
$ cmake --build build
$ cmake --build build --target install
$ cmake --build build --target package # MSYS2 and Debian Linux Only
$ cmake --build build --target test # Not on MSYS2 or Visual Studio
$ cmake . -B build_[pr-number] -G Ninja -DCMAKE_INSTALL_PREFIX=$PWD/build_[pr-number]/install
$ cmake --build build_[pr-number]
$ cmake --build build_[pr-number] --target install
$ cmake --build build_[pr-number] --target package # MSYS2 and Debian Linux Only

:strong:`Run tests`

.. code-block:: sh

$ cmake --build build --target test
$ cmake --build build_[pr-number] --target test

:strong:`Read The Issue's Notes`

Expand All @@ -75,10 +74,10 @@ probably have to re-download the diff and run another test.
If it is a big change, it might be worthwhile to run an entire game with just AI to make sure it does not
break anything. You can compile the code, with additional checks such as address sanitizer with
:code:`$ cmake . --preset ASan`. Once the code is compiled, you can run the autogame with
:code:`$ ./build/freeciv21-server -r ./data/test-autogame.serv`. You can also observe the game with
:code:`$ ./build/freeciv21-client -a -p 5556 -s localhost`. ASan by default halts on every error, this is
sometimes useful to developers to fix the errors sequentially. If you'd rather prefer listing all the errors
at once, set the environment variable using :code:`$ export ASAN_OPTIONS="halt_on_error=0"`
:code:`$ ./build_[pr-number]/freeciv21-server -r ./data/test-autogame.serv`. You can also observe the game
with :code:`$ ./build_[pr-number]/freeciv21-client -a -p 5556 -s localhost`. ASan by default halts on every
error, this is sometimes useful to developers to fix the errors sequentially. If you'd rather prefer listing
all the errors at once, set the environment variable using :code:`$ export ASAN_OPTIONS="halt_on_error=0"`

:strong:`Cleanup`

Expand Down Expand Up @@ -108,7 +107,7 @@ images and music files get copied over, merged, or renamed, and authorship infor
sure that the author of the PR understands where the files come from and who authored them. If possible, ask
the original author directly if we can include their art.

We request that all assets file be accompanied with license and copyright information in the form of a
We request that all asset files be accompanied with license and copyright information in the form of a
`license file <https://reuse.software/spec/#comment-headers>`_. You will find many examples in the
repository. The license should be `compatible with version 3 of the GPL
<https://www.gnu.org/licenses/license-list.html>`_.
Expand Down
2 changes: 1 addition & 1 deletion docs/Contributing/pull-request.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ one commit into a Pull Request then you can read about `git add <https://git-scm

~/GitHub/freeciv21$ git status
~/GitHub/freeciv21$ git add --all
~/GitHub/freeciv21$ git clang-format
~/GitHub/freeciv21$ git clang-format --binary /usr/bin/clang-format-11
~/GitHub/freeciv21$ git add --all
~/GitHub/freeciv21$ git commit

Expand Down
5 changes: 2 additions & 3 deletions scripts/eval-pr
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Bash shell script to aid the process of evaluating a pull request
#---

version="1.1"
version="1.2"
re='^[0-9]+$'
asan="false"

Expand Down Expand Up @@ -142,8 +142,7 @@ debug_eval ()
echo "-- Building Debug."
echo
# We ask for a debug build in order to run the code through a debugger while evaluating
cmake -S . -B build_$pull_request \
-G "Ninja Multi-Config" \
cmake -S . -B build_$pull_request -G Ninja \
-DCMAKE_INSTALL_PREFIX=$PWD/build_$pull_request/install \
-DCMAKE_BUILD_TYPE=Debug
cmake --build build_$pull_request
Expand Down
Loading