Merge pull request #2453 from tobylane/actionslinux

Actions for Linux updates
This commit is contained in:
Stephen E. Baker
2023-12-17 14:07:36 -05:00
committed by GitHub
2 changed files with 30 additions and 24 deletions

View File

@@ -1,7 +1,7 @@
---
name: Linux and Tests
on: # yamllint disable-line rule:trurhy
on:
push:
branches-ignore:
- 'gh-pages'
@@ -9,7 +9,7 @@ on: # yamllint disable-line rule:trurhy
jobs:
Linux:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
@@ -19,9 +19,10 @@ jobs:
cmake: 1
lua: LuaJIT
luac: luac5.1
animview: and AnimView
animview: ' and AnimView'
animviewreqs: 'and AnimView requirements'
packages: libluajit-5.1-dev luajit libwxgtk3.0-gtk3-dev
cmakejit: '-DBUILD_ANIMVIEWER=ON -DWITH_LUAJIT=ON -DLUA_LIBRARY=/usr/lib/x86_64-linux-gnu/libluajit-5.1.so'
cmakejit: '-DBUILD_ANIMVIEW=ON -DWITH_LUAJIT=ON -DLUA_LIBRARY=/usr/lib/x86_64-linux-gnu/libluajit-5.1.so'
- static_analysis: 0
docs: 0
lua: Lua 5.1
@@ -29,14 +30,14 @@ jobs:
packages: liblua5.1-dev lua5.1
- static_analysis: 1
docs: 1
lua: Lua 5.3
luac: luac5.3
packages: liblua5.3-dev lua5.3
catch2: -DENABLE_UNIT_TESTS=ON
lua: Lua 5.4
luac: luac5.4
packages: liblua5.4-dev lua5.4
catch2: '-DENABLE_UNIT_TESTS=ON'
name: Linux and Tests on ${{ matrix.lua }}
steps:
- uses: actions/checkout@v3 # Keeps the git OAuth token after checkout
- name: Install ${{ matrix.lua }} ${{ matrix.animview }}
- name: Install ${{ matrix.lua }} ${{ matrix.animviewreqs }}
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.packages }} luarocks
@@ -53,19 +54,19 @@ jobs:
- name: Install static analysis requirements
if: matrix.static_analysis
run: |
sudo apt-get install doxygen yamllint clang-tidy-11
sudo apt-get install doxygen yamllint clang-format-11 clang-tidy-11
sudo pip3 install -I codespell==2.2 cmakelint==1.4
# Build catch2
# Build Catch2
git clone --quiet https://github.com/catchorg/Catch2 \
--branch v3.1.1 --depth=1
cd Catch2
cmake . -Bbuild
cd build
--branch v3.4.0 --depth=1 ../Catch2
mkdir ../Catch2/build
cd ../Catch2/build
cmake .. -B.
sudo make install
cd ../../
rm -rf Catch2
sudo luarocks --lua-version 5.4 install luafilesystem
- name: Install CMake 3.10
if: matrix.cmake
@@ -74,12 +75,12 @@ jobs:
curl -L https://github.com/Kitware/CMake/releases/download/v3.10.3/cmake-3.10.3-Linux-x86_64.sh -o cmake.sh
sudo bash cmake.sh --prefix=/usr/local/ --exclude-subdir --skip-license
cmake --version
- name: Create CorsixTH ${{ matrix.animview }} makefiles with ${{ matrix.lua }}
- name: Create CorsixTH${{ matrix.animview }} makefiles with ${{ matrix.lua }}
run: |
cmake . -G"Unix Makefiles" -Bbuild --debug-output \
cmake . -G"Unix Makefiles" -Bbuild --debug-output -LA \
-DWITH_AUDIO=ON -DWITH_MOVIES=ON ${{ matrix.catch2 }} \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON ${{ matrix.cmakejit }}
- name: Build CorsixTH ${{ matrix.animview }} with ${{ matrix.lua }}
- name: Build CorsixTH${{ matrix.animview }} with ${{ matrix.lua }}
run: |
cmake --build build/ -- VERBOSE=1
sudo cmake --build build/ -- install
@@ -118,18 +119,23 @@ jobs:
libs/CMakeLists.txt libs/rnc/CMakeLists.txt \
CMake/GenerateDoc.cmake CMake/PrecompiledDeps.cmake CMake/VcpkgDeps.cmake
# Validate these build files
yamllint --config-data "rules: {line-length: disable}" .github/workflows/Linux.yml
yamllint --config-data "rules: {line-length: disable}" .github/workflows/*.yml
shellcheck --shell sh scripts/macos_luarocks
# Check the windows config file is up to date
eval "$(luarocks --lua-version 5.4 path)"
lua5.4 scripts/generate_windows_config.lua
git diff --exit-code
- name: Run clang code tests
if: matrix.static_analysis
run: |
# Check cpp format
clang-format-11 -i CorsixTH/Src/*.cpp CorsixTH/Src/*.h AnimView/*.cpp \
AnimView/*.h libs/rnc/*.cpp libs/rnc/*.h CorsixTH/SrcUnshared/main.cpp
git diff --exit-code
git diff
# Clang-tidy linter
clang-tidy-11 -p build --warnings-as-errors=\* \
CorsixTH/Src/*.c CorsixTH/Src/*.cpp libs/rnc/*.cpp CorsixTH/SrcUnshared/main.cpp
git diff --quiet # exit if clang-format made any changes
- name: Generate documentation
if: matrix.docs
run: |

View File

@@ -92,8 +92,8 @@ prevent_edge_scrolling = false
capture_mouse = true
-------------------------------------------------------------------------------
-- Right Mouse Panning: By default, it is disabled (right_mouse_scrolling = false).
-- This means that the default panning method is pressing the middle mouse button.
-- Right Mouse Scrolling: By default, it is disabled (right_mouse_scrolling = false).
-- This means that the default scrolling method is pressing the middle mouse button.
--
right_mouse_scrolling = false