diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/CONTRIBUTING.md | 110 | ||||
-rw-r--r-- | .github/PULL_REQUEST_TEMPLATE.md | 1 | ||||
-rw-r--r-- | .github/workflows/android.yml | 10 | ||||
-rw-r--r-- | .github/workflows/build.yml | 83 | ||||
-rw-r--r-- | .github/workflows/cpp_lint.yml | 27 | ||||
-rw-r--r-- | .github/workflows/macos.yml | 66 |
6 files changed, 210 insertions, 87 deletions
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index b01a89509..f60f584f9 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -10,13 +10,31 @@ Contributions are welcome! Here's how you can help: ## Code -1. [Fork](https://help.github.com/articles/fork-a-repo/) the repository and [clone](https://help.github.com/articles/cloning-a-repository/) your fork. +1. [Fork](https://help.github.com/articles/fork-a-repo/) the repository and + [clone](https://help.github.com/articles/cloning-a-repository/) your fork. -2. Before you start coding, consider opening an [issue at Github](https://github.com/minetest/minetest/issues) to discuss the suitability and implementation of your intended contribution with the core developers. If you are planning to start some very significant coding, you would benefit from first discussing on our IRC development channel [#minetest-dev](http://www.minetest.net/irc/). Note that a proper IRC client is required to speak on this channel. +2. Before you start coding, consider opening an + [issue at Github](https://github.com/minetest/minetest/issues) to discuss the + suitability and implementation of your intended contribution with the core + developers. + + Any Pull Request that isn't a bug fix and isn't covered by + [the roadmap](../doc/direction.md) will be closed within a week unless it + receives a concept approval from a Core Developer. For this reason, it is + recommended that you open an issue for any such pull requests before doing + the work, to avoid disappointment. + + You may also benefit from discussing on our IRC development channel + [#minetest-dev](http://www.minetest.net/irc/). Note that a proper IRC client + is required to speak on this channel. 3. Start coding! - - Refer to the [Lua API](https://github.com/minetest/minetest/blob/master/doc/lua_api.txt), [Developer Wiki](http://dev.minetest.net/Main_Page) and other [documentation](https://github.com/minetest/minetest/tree/master/doc). - - Follow the [C/C++](http://dev.minetest.net/Code_style_guidelines) and [Lua](http://dev.minetest.net/Lua_code_style_guidelines) code style guidelines. + - Refer to the + [Lua API](https://github.com/minetest/minetest/blob/master/doc/lua_api.txt), + [Developer Wiki](http://dev.minetest.net/Main_Page) and other + [documentation](https://github.com/minetest/minetest/tree/master/doc). + - Follow the [C/C++](http://dev.minetest.net/Code_style_guidelines) and + [Lua](http://dev.minetest.net/Lua_code_style_guidelines) code style guidelines. - Check your code works as expected and document any changes to the Lua API. 4. Commit & [push](https://help.github.com/articles/pushing-to-a-remote/) your changes to a new branch (not `master`, one change per branch) @@ -33,67 +51,115 @@ Contributions are welcome! Here's how you can help: 5. Once you are happy with your changes, submit a pull request. - Open the [pull-request form](https://github.com/minetest/minetest/pull/new/master). - - Add a description explaining what you've done (or if it's a work-in-progress - what you need to do). + - Add a description explaining what you've done (or if it's a + work-in-progress - what you need to do). + - Make sure to fill out the pull request template. ### A pull-request is considered merge-able when: -1. It follows the roadmap in some way and fits the whole picture of the project: [roadmap introduction](http://c55.me/blog/?p=1491), [roadmap continued](https://forum.minetest.net/viewtopic.php?t=9177) +1. It follows [the roadmap](../doc/direction.md) in some way and fits the whole + picture of the project. 2. It works. -3. It follows the code style for [C/C++](http://dev.minetest.net/Code_style_guidelines) or [Lua](http://dev.minetest.net/Lua_code_style_guidelines). -4. The code's interfaces are well designed, regardless of other aspects that might need more work in the future. +3. It follows the code style for + [C/C++](http://dev.minetest.net/Code_style_guidelines) or + [Lua](http://dev.minetest.net/Lua_code_style_guidelines). +4. The code's interfaces are well designed, regardless of other aspects that + might need more work in the future. 5. It uses protocols and formats which include the required compatibility. ### Important note about automated GitHub checks -When you submit a pull request, GitHub automatically runs checks on the Minetest Engine combined with your changes. One of these checks is called 'cpp lint / clang format', which checks code formatting. Because formatting for readability requires human judgement this check often fails and often makes unsuitable formatting requests which make code readability worse. +When you submit a pull request, GitHub automatically runs checks on the Minetest +Engine combined with your changes. One of these checks is called 'cpp lint / +clang format', which checks code formatting. Because formatting for readability +requires human judgement this check often fails and often makes unsuitable +formatting requests which make code readability worse. -If this check fails, look at the details to check for any clear mistakes and correct those. However, you should not apply everything ClangFormat requests. Ignore requests that make code readability worse and any other clearly unsuitable requests. Discuss in the pull request with a core developer about how to progress. +If this check fails, look at the details to check for any clear mistakes and +correct those. However, you should not apply everything ClangFormat requests. +Ignore requests that make code readability worse and any other clearly +unsuitable requests. Discuss in the pull request with a core developer about how +to progress. ## Issues -If you experience an issue, we would like to know the details - especially when a stable release is on the way. +If you experience an issue, we would like to know the details - especially when +a stable release is on the way. 1. Do a quick search on GitHub to check if the issue has already been reported. -2. Is it an issue with the Minetest *engine*? If not, report it [elsewhere](http://www.minetest.net/development/#reporting-issues). -3. [Open an issue](https://github.com/minetest/minetest/issues/new) and describe the issue you are having - you could include: +2. Is it an issue with the Minetest *engine*? If not, report it + [elsewhere](http://www.minetest.net/development/#reporting-issues). +3. [Open an issue](https://github.com/minetest/minetest/issues/new) and describe + the issue you are having - you could include: - Error logs (check the bottom of the `debug.txt` file). - Screenshots. - Ways you have tried to solve the issue, and whether they worked or not. - Your Minetest version and the content (games, mods or texture packs) you have installed. - Your platform (e.g. Windows 10 or Ubuntu 15.04 x64). -After reporting you should aim to answer questions or clarifications as this helps pinpoint the cause of the issue (if you don't do this your issue may be closed after 1 month). +After reporting you should aim to answer questions or clarifications as this +helps pinpoint the cause of the issue (if you don't do this your issue may be +closed after 1 month). ## Feature requests -Feature requests are welcome but take a moment to see if your idea follows the roadmap in some way and fits the whole picture of the project: [roadmap introduction](http://c55.me/blog/?p=1491), [roadmap continued](https://forum.minetest.net/viewtopic.php?t=9177). You should provide a clear explanation with as much detail as possible. +Feature requests are welcome but take a moment to see if your idea follows +[the roadmap](../doc/direction.md) in some way and fits the whole picture of +the project. You should provide a clear explanation with as much detail as +possible. ## Translations -Translations of Minetest are performed using Weblate. You can access the project page with a list of current languages [here](https://hosted.weblate.org/projects/minetest/minetest/). +The core translations of Minetest are performed using Weblate. You can access +the project page with a list of current languages +[here](https://hosted.weblate.org/projects/minetest/minetest/). + +Builtin (the component which contains things like server messages, chat command +descriptions, privilege descriptions) is translated separately; it needs to be +translated by editing a `.tr` text file. See +[Translation](https://dev.minetest.net/Translation) for more information. ## Donations -If you'd like to monetarily support Minetest development, you can find donation methods on [our website](http://www.minetest.net/development/#donate). +If you'd like to monetarily support Minetest development, you can find donation +methods on [our website](http://www.minetest.net/development/#donate). # Maintaining -*This is a concise version of the [Rules & Guidelines](http://dev.minetest.net/Category:Rules_and_Guidelines) on the developer wiki.* +* This is a concise version of the + [Rules & Guidelines](http://dev.minetest.net/Category:Rules_and_Guidelines) on the developer wiki.* These notes are for those who have push access Minetest (core developers / maintainers). - See the [project organisation](http://dev.minetest.net/Organisation) for the people involved. +## Concept approvals and roadmaps + +If a Pull Request is not a bug fix: + +* If it matches a goal in [the roadmap](../doc/direction.md), then the PR should + be labelled as "Roadmap" and the goal stated by number in the description. +* If it doesn't match a goal, then it needs to receive a concept approval within + a week of being opened to remain open. This 1 week deadline does not apply to + PRs opened before the roadmap was adopted; instead, they may remain open or be + closed as needed. Use the "Concept Approved" label. Issues can be marked as + "Concept Approved" to give preapproval to future PRs. + ## Reviewing pull requests -Pull requests should be reviewed and, if appropriate, checked if they achieve their intended purpose. You can show that you are in the process of, or will review the pull request by commenting *"Looks good"* or something similar. +Pull requests should be reviewed and, if appropriate, checked if they achieve +their intended purpose. You can show that you are in the process of, or will +review the pull request by commenting *"Looks good"* or something similar. **If the pull-request is not [merge-able](#a-pull-request-is-considered-merge-able-when):** -Submit a comment explaining to the author what they need to change to make the pull-request merge-able. +Submit a comment explaining to the author what they need to change to make the +pull-request merge-able. -- If the author comments or makes changes to the pull-request, it can be reviewed again. -- If no response is made from the author within 1 month (when improvements are suggested or a question is asked), it can be closed. +- If the author comments or makes changes to the pull-request, it can be + reviewed again. +- If no response is made from the author within 1 month (when improvements are + suggested or a question is asked), it can be closed. **If the pull-request is [merge-able](#a-pull-request-is-considered-merge-able-when):** diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index ccec99bc5..4132826cd 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,6 +3,7 @@ Add compact, short information about your PR for easier understanding: - Goal of the PR - How does the PR work? - Does it resolve any reported issue? +- Does this relate to a goal in [the roadmap](../doc/direction.md)? - If not a bug fix, why is this PR needed? What usecases does it solve? ## To do diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 47ab64d11..cc5fe83ef 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -21,13 +21,13 @@ on: jobs: build: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 + - name: Install deps + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends gettext openjdk-11-jdk-headless - name: Build with Gradle run: cd android; ./gradlew assemblerelease - name: Save armeabi artifact diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a3cc92a8e..79f9af5c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -13,6 +13,8 @@ on: - 'util/buildbot/**' - 'util/ci/**' - '.github/workflows/**.yml' + - 'Dockerfile' + - '.dockerignore' pull_request: paths: - 'lib/**.[ch]' @@ -24,51 +26,53 @@ on: - 'util/buildbot/**' - 'util/ci/**' - '.github/workflows/**.yml' + - 'Dockerfile' + - '.dockerignore' jobs: - # This is our minor gcc compiler - gcc_6: + # Older gcc version (should be close to our minimum supported version) + gcc_5: runs-on: ubuntu-18.04 steps: - uses: actions/checkout@v2 - name: Install deps run: | source ./util/ci/common.sh - install_linux_deps g++-6 + install_linux_deps g++-5 - name: Build run: | ./util/ci/build.sh env: - CC: gcc-6 - CXX: g++-6 + CC: gcc-5 + CXX: g++-5 - name: Test run: | ./bin/minetest --run-unittests - # This is the current gcc compiler (available in bionic) - gcc_8: - runs-on: ubuntu-18.04 + # Current gcc version + gcc_10: + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Install deps run: | source ./util/ci/common.sh - install_linux_deps g++-8 + install_linux_deps g++-10 - name: Build run: | ./util/ci/build.sh env: - CC: gcc-8 - CXX: g++-8 + CC: gcc-10 + CXX: g++-10 - name: Test run: | ./bin/minetest --run-unittests - # This is our minor clang compiler + # Older clang version (should be close to our minimum supported version) clang_3_9: runs-on: ubuntu-18.04 steps: @@ -76,7 +80,7 @@ jobs: - name: Install deps run: | source ./util/ci/common.sh - install_linux_deps clang-3.9 + install_linux_deps clang-3.9 gdb - name: Build run: | @@ -85,26 +89,30 @@ jobs: CC: clang-3.9 CXX: clang++-3.9 - - name: Test + - name: Unittest run: | ./bin/minetest --run-unittests - # This is the current clang version - clang_9: - runs-on: ubuntu-18.04 + - name: Integration test + devtest + run: | + ./util/test_multiplayer.sh + + # Current clang version + clang_10: + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 - name: Install deps run: | source ./util/ci/common.sh - install_linux_deps clang-9 valgrind libluajit-5.1-dev + install_linux_deps clang-10 valgrind libluajit-5.1-dev - name: Build run: | ./util/ci/build.sh env: - CC: clang-9 - CXX: clang++-9 + CC: clang-10 + CXX: clang++-10 CMAKE_FLAGS: "-DREQUIRE_LUAJIT=1" - name: Test @@ -124,7 +132,7 @@ jobs: - name: Install deps run: | source ./util/ci/common.sh - install_linux_deps clang-9 + install_linux_deps --old-irr clang-9 - name: Build prometheus-cpp run: | @@ -142,29 +150,6 @@ jobs: run: | ./bin/minetestserver --run-unittests - # Build without freetype (client-only) - clang_9_no_freetype: - name: "clang_9 (FREETYPE=0)" - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - name: Install deps - run: | - source ./util/ci/common.sh - install_linux_deps clang-9 - - - name: Build - run: | - ./util/ci/build.sh - env: - CC: clang-9 - CXX: clang++-9 - CMAKE_FLAGS: "-DENABLE_FREETYPE=0 -DBUILD_SERVER=0" - - - name: Test - run: | - ./bin/minetest --run-unittests - docker: name: "Docker image" runs-on: ubuntu-18.04 @@ -172,7 +157,8 @@ jobs: - uses: actions/checkout@v2 - name: Build docker image run: | - docker build . + docker build . -t minetest:latest + docker run --rm minetest:latest /usr/local/bin/minetestserver --version win32: name: "MinGW cross-compiler (32-bit)" @@ -212,11 +198,14 @@ jobs: msvc: name: VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }} - runs-on: windows-2019 + runs-on: windows-2019 + #### Disabled due to Irrlicht switch + if: false + #### Disabled due to Irrlicht switch env: VCPKG_VERSION: 0bf3923f9fab4001c00f0f429682a0853b5749e0 # 2020.11 - vcpkg_packages: irrlicht zlib curl[winssl] openal-soft libvorbis libogg sqlite3 freetype luajit + vcpkg_packages: irrlicht zlib zstd curl[winssl] openal-soft libvorbis libogg sqlite3 freetype luajit strategy: fail-fast: false matrix: diff --git a/.github/workflows/cpp_lint.yml b/.github/workflows/cpp_lint.yml index 1f97d105a..2bd884c7a 100644 --- a/.github/workflows/cpp_lint.yml +++ b/.github/workflows/cpp_lint.yml @@ -24,20 +24,21 @@ on: - '.github/workflows/**.yml' jobs: - clang_format: - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - name: Install clang-format - run: | - sudo apt-get install clang-format-9 -qyy - - name: Run clang-format - run: | - source ./util/ci/lint.sh - perform_lint - env: - CLANG_FORMAT: clang-format-9 +# clang_format: +# runs-on: ubuntu-18.04 +# steps: +# - uses: actions/checkout@v2 +# - name: Install clang-format +# run: | +# sudo apt-get install clang-format-9 -qyy +# +# - name: Run clang-format +# run: | +# source ./util/ci/clang-format.sh +# check_format +# env: +# CLANG_FORMAT: clang-format-9 clang_tidy: runs-on: ubuntu-18.04 diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000..69253b70a --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,66 @@ +name: macos + +# build on c/cpp changes or workflow changes +on: + push: + paths: + - 'lib/**.[ch]' + - 'lib/**.cpp' + - 'src/**.[ch]' + - 'src/**.cpp' + - '**/CMakeLists.txt' + - 'cmake/Modules/**' + - '.github/workflows/macos.yml' + pull_request: + paths: + - 'lib/**.[ch]' + - 'lib/**.cpp' + - 'src/**.[ch]' + - 'src/**.cpp' + - '**/CMakeLists.txt' + - 'cmake/Modules/**' + - '.github/workflows/macos.yml' + +env: + IRRLICHT_TAG: 1.9.0mt4 + MINETEST_GAME_REPO: https://github.com/minetest/minetest_game.git + MINETEST_GAME_BRANCH: master + MINETEST_GAME_NAME: minetest_game + +jobs: + build: + runs-on: macos-10.15 + steps: + - uses: actions/checkout@v2 + - name: Install deps + run: | + pkgs=(cmake freetype gettext gmp hiredis jpeg jsoncpp leveldb libogg libpng libvorbis luajit zstd) + brew update + brew install ${pkgs[@]} + brew unlink $(brew ls --formula) + brew link ${pkgs[@]} + + - name: Build + run: | + git clone -b $MINETEST_GAME_BRANCH $MINETEST_GAME_REPO games/$MINETEST_GAME_NAME + rm -rvf games/$MINETEST_GAME_NAME/.git + git clone https://github.com/minetest/irrlicht -b $IRRLICHT_TAG lib/irrlichtmt + mkdir cmakebuild + cd cmakebuild + cmake .. \ + -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 \ + -DCMAKE_FIND_FRAMEWORK=LAST \ + -DCMAKE_INSTALL_PREFIX=../build/macos/ \ + -DRUN_IN_PLACE=FALSE \ + -DENABLE_FREETYPE=TRUE -DENABLE_GETTEXT=TRUE + make -j2 + make install + + - name: Test + run: | + ./build/macos/minetest.app/Contents/MacOS/minetest --run-unittests + + - uses: actions/upload-artifact@v2 + with: + name: minetest-macos + path: ./build/macos/ |