diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/ISSUE_TEMPLATE/bug_report.md | 6 | ||||
-rw-r--r-- | .github/workflows/android.yml | 6 | ||||
-rw-r--r-- | .github/workflows/build.yml | 59 | ||||
-rw-r--r-- | .github/workflows/cpp_lint.yml | 14 | ||||
-rw-r--r-- | .github/workflows/lua.yml | 72 | ||||
-rw-r--r-- | .github/workflows/lua_lint.yml | 32 | ||||
-rw-r--r-- | .github/workflows/macos.yml | 21 |
7 files changed, 128 insertions, 82 deletions
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index b6f351c15..7cf34bd4a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -8,8 +8,8 @@ assignees: '' ##### Minetest version <!-- -Paste Minetest version between quotes below -If you are on a devel version, please add git commit hash +Paste Minetest version between quotes below. +If you are on a devel version, please add git commit hash. You can use `minetest --version` to find it. --> ``` @@ -29,4 +29,4 @@ OpenGL version: <!-- Describe your problem here --> ##### Steps to reproduce -<!-- For bug reports or build issues, explain how the problem happened --> +<!-- Explain how the problem has happened, providing a minimal test (i.e. a code snippet reduced to the bone) where possible --> diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index cc5fe83ef..20411a332 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -23,7 +23,7 @@ jobs: build: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install deps run: | sudo apt-get update @@ -31,12 +31,12 @@ jobs: - name: Build with Gradle run: cd android; ./gradlew assemblerelease - name: Save armeabi artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: Minetest-armeabi-v7a.apk path: android/app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned.apk - name: Save arm64 artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: Minetest-arm64-v8a.apk path: android/app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 79f9af5c7..d578c3d9f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: gcc_5: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install deps run: | source ./util/ci/common.sh @@ -55,7 +55,7 @@ jobs: gcc_10: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install deps run: | source ./util/ci/common.sh @@ -76,7 +76,7 @@ jobs: clang_3_9: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install deps run: | source ./util/ci/common.sh @@ -101,7 +101,7 @@ jobs: clang_10: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install deps run: | source ./util/ci/common.sh @@ -126,13 +126,13 @@ jobs: # Build with prometheus-cpp (server-only) clang_9_prometheus: name: "clang_9 (PROMETHEUS=1)" - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install deps run: | source ./util/ci/common.sh - install_linux_deps --old-irr clang-9 + install_linux_deps clang-9 - name: Build prometheus-cpp run: | @@ -152,9 +152,9 @@ jobs: docker: name: "Docker image" - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Build docker image run: | docker build . -t minetest:latest @@ -162,13 +162,13 @@ jobs: win32: name: "MinGW cross-compiler (32-bit)" - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install compiler run: | - sudo apt-get update -q && sudo apt-get install gettext -qyy - wget http://minetest.kitsunemimi.pw/mingw-w64-i686_9.2.0_ubuntu18.04.tar.xz -O mingw.tar.xz + sudo apt-get update && sudo apt-get install -y gettext + wget http://minetest.kitsunemimi.pw/mingw-w64-i686_11.2.0_ubuntu20.04.tar.xz -O mingw.tar.xz sudo tar -xaf mingw.tar.xz -C /usr - name: Build @@ -180,13 +180,13 @@ jobs: win64: name: "MinGW cross-compiler (64-bit)" - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install compiler run: | - sudo apt-get update -q && sudo apt-get install gettext -qyy - wget http://minetest.kitsunemimi.pw/mingw-w64-x86_64_9.2.0_ubuntu18.04.tar.xz -O mingw.tar.xz + sudo apt-get update && sudo apt-get install -y gettext + wget http://minetest.kitsunemimi.pw/mingw-w64-x86_64_11.2.0_ubuntu20.04.tar.xz -O mingw.tar.xz sudo tar -xaf mingw.tar.xz -C /usr - name: Build @@ -199,13 +199,10 @@ jobs: msvc: name: VS 2019 ${{ matrix.config.arch }}-${{ matrix.type }} 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 zstd curl[winssl] openal-soft libvorbis libogg sqlite3 freetype luajit + VCPKG_VERSION: 5cf60186a241e84e8232641ee973395d4fde90e1 + # 2022.02 + vcpkg_packages: zlib zstd curl[winssl] openal-soft libvorbis libogg libjpeg-turbo sqlite3 freetype luajit gmp jsoncpp opengl-registry strategy: fail-fast: false matrix: @@ -226,11 +223,15 @@ jobs: # Enable it, when working on the installer. steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + + - name: Checkout IrrlichtMt + run: | + $ref = @(Get-Content misc\irrlichtmt_tag.txt) + git clone https://github.com/minetest/irrlicht lib\irrlichtmt --depth 1 -b $ref[0] - name: Restore from cache and run vcpkg - uses: lukka/run-vcpkg@v5 + uses: lukka/run-vcpkg@v7 with: vcpkgArguments: ${{env.vcpkg_packages}} vcpkgDirectory: '${{ github.workspace }}\vcpkg' @@ -238,7 +239,7 @@ jobs: vcpkgGitCommitId: ${{ env.VCPKG_VERSION }} vcpkgTriplet: ${{ matrix.config.vcpkg_triplet }} - - name: CMake + - name: Minetest CMake run: | cmake ${{matrix.config.generator}} ` -DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" ` @@ -246,7 +247,7 @@ jobs: -DENABLE_POSTGRESQL=OFF ` -DRUN_IN_PLACE=${{ contains(matrix.type, 'portable') }} . - - name: Build + - name: Build Minetest run: cmake --build . --config Release - name: CPack @@ -265,7 +266,7 @@ jobs: - name: Package Clean run: rm -r $env:GITHUB_WORKSPACE\Package\_CPack_Packages - - uses: actions/upload-artifact@v1 + - uses: actions/upload-artifact@v3 with: name: msvc-${{ matrix.config.arch }}-${{ matrix.type }} path: .\Package\ diff --git a/.github/workflows/cpp_lint.yml b/.github/workflows/cpp_lint.yml index 2bd884c7a..581ee06d6 100644 --- a/.github/workflows/cpp_lint.yml +++ b/.github/workflows/cpp_lint.yml @@ -26,12 +26,13 @@ on: jobs: # clang_format: -# runs-on: ubuntu-18.04 +# runs-on: ubuntu-20.04 # steps: -# - uses: actions/checkout@v2 +# - uses: actions/checkout@v3 # - name: Install clang-format # run: | -# sudo apt-get install clang-format-9 -qyy +# sudo apt-get update +# sudo apt-get install -y clang-format-9 # # - name: Run clang-format # run: | @@ -41,14 +42,13 @@ jobs: # CLANG_FORMAT: clang-format-9 clang_tidy: - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install deps run: | - sudo apt-get install clang-tidy-9 -qyy source ./util/ci/common.sh - install_linux_deps + install_linux_deps clang-tidy-9 - name: Run clang-tidy run: | diff --git a/.github/workflows/lua.yml b/.github/workflows/lua.yml new file mode 100644 index 000000000..21cbbdcee --- /dev/null +++ b/.github/workflows/lua.yml @@ -0,0 +1,72 @@ +name: lua_lint + +# Lint on lua changes on builtin or if workflow changed +on: + push: + paths: + - 'builtin/**.lua' + - 'games/devtest/**.lua' + - '.github/workflows/**.yml' + pull_request: + paths: + - 'builtin/**.lua' + - 'games/devtest/**.lua' + - '.github/workflows/**.yml' + +jobs: + # Note that the integration tests are also run build.yml, but only when C++ code is changed. + integration_tests: + name: "Compile and run multiplayer tests" + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v3 + - name: Install deps + run: | + source ./util/ci/common.sh + install_linux_deps clang-10 gdb libluajit-5.1-dev + + - name: Build + run: | + ./util/ci/build.sh + env: + CC: clang-10 + CXX: clang++-10 + CMAKE_FLAGS: "-DENABLE_GETTEXT=0 -DBUILD_SERVER=0" + + - name: Integration test + devtest + run: | + ./util/test_multiplayer.sh + + luacheck: + name: "Builtin Luacheck and Unit Tests" + runs-on: ubuntu-20.04 + + steps: + + - uses: actions/checkout@v3 + - uses: leafo/gh-actions-lua@v9 + with: + luaVersion: "5.1.5" + - uses: leafo/gh-actions-luarocks@v4 + + - name: Install LuaJIT + run: | + cd $HOME + git clone https://github.com/LuaJIT/LuaJIT/ + cd LuaJIT + make -j$(nproc) + + - name: Install luarocks tools + run: | + luarocks install --local luacheck + luarocks install --local busted + + - name: Run checks (builtin) + run: | + $HOME/.luarocks/bin/luacheck builtin + $HOME/.luarocks/bin/busted builtin + $HOME/.luarocks/bin/busted builtin --lua=$HOME/LuaJIT/src/luajit + + - name: Run checks (devtest) + run: | + $HOME/.luarocks/bin/luacheck --config=games/devtest/.luacheckrc games/devtest diff --git a/.github/workflows/lua_lint.yml b/.github/workflows/lua_lint.yml deleted file mode 100644 index 738e5afff..000000000 --- a/.github/workflows/lua_lint.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: lua_lint - -# Lint on lua changes on builtin or if workflow changed -on: - push: - paths: - - 'builtin/**.lua' - - '.github/workflows/**.yml' - pull_request: - paths: - - 'builtin/**.lua' - - '.github/workflows/**.yml' - -jobs: - luacheck: - name: "Builtin Luacheck and Unit Tests" - runs-on: ubuntu-18.04 - steps: - - uses: actions/checkout@v2 - - name: Install luarocks - run: | - sudo apt-get install luarocks -qyy - - - name: Install luarocks tools - run: | - luarocks install --local luacheck - luarocks install --local busted - - - name: Run checks - run: | - $HOME/.luarocks/bin/luacheck builtin - $HOME/.luarocks/bin/busted builtin diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 69253b70a..038765494 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -22,7 +22,6 @@ on: - '.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 @@ -31,7 +30,7 @@ jobs: build: runs-on: macos-10.15 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install deps run: | pkgs=(cmake freetype gettext gmp hiredis jpeg jsoncpp leveldb libogg libpng libvorbis luajit zstd) @@ -43,10 +42,9 @@ jobs: - 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 + git clone https://github.com/minetest/irrlicht lib/irrlichtmt --depth 1 -b $(cat misc/irrlichtmt_tag.txt) + mkdir build + cd build cmake .. \ -DCMAKE_OSX_DEPLOYMENT_TARGET=10.14 \ -DCMAKE_FIND_FRAMEWORK=LAST \ @@ -60,7 +58,14 @@ jobs: run: | ./build/macos/minetest.app/Contents/MacOS/minetest --run-unittests - - uses: actions/upload-artifact@v2 + # Zipping the built .app preserves permissions on the contained files, + # which the GitHub artifact pipeline would otherwise strip away. + - name: CPack + run: | + cd build + cpack -G ZIP -B macos + + - uses: actions/upload-artifact@v3 with: name: minetest-macos - path: ./build/macos/ + path: ./build/macos/*.zip |