mirror of
https://github.com/CorsixTH/CorsixTH.git
synced 2025-07-23 20:30:35 +02:00
Merge pull request #2453 from tobylane/actionslinux
Actions for Linux updates
This commit is contained in:
50
.github/workflows/Linux.yml
vendored
50
.github/workflows/Linux.yml
vendored
@@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
name: Linux and Tests
|
name: Linux and Tests
|
||||||
|
|
||||||
on: # yamllint disable-line rule:trurhy
|
on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- 'gh-pages'
|
- 'gh-pages'
|
||||||
@@ -9,7 +9,7 @@ on: # yamllint disable-line rule:trurhy
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Linux:
|
Linux:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -19,9 +19,10 @@ jobs:
|
|||||||
cmake: 1
|
cmake: 1
|
||||||
lua: LuaJIT
|
lua: LuaJIT
|
||||||
luac: luac5.1
|
luac: luac5.1
|
||||||
animview: and AnimView
|
animview: ' and AnimView'
|
||||||
|
animviewreqs: 'and AnimView requirements'
|
||||||
packages: libluajit-5.1-dev luajit libwxgtk3.0-gtk3-dev
|
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
|
- static_analysis: 0
|
||||||
docs: 0
|
docs: 0
|
||||||
lua: Lua 5.1
|
lua: Lua 5.1
|
||||||
@@ -29,14 +30,14 @@ jobs:
|
|||||||
packages: liblua5.1-dev lua5.1
|
packages: liblua5.1-dev lua5.1
|
||||||
- static_analysis: 1
|
- static_analysis: 1
|
||||||
docs: 1
|
docs: 1
|
||||||
lua: Lua 5.3
|
lua: Lua 5.4
|
||||||
luac: luac5.3
|
luac: luac5.4
|
||||||
packages: liblua5.3-dev lua5.3
|
packages: liblua5.4-dev lua5.4
|
||||||
catch2: -DENABLE_UNIT_TESTS=ON
|
catch2: '-DENABLE_UNIT_TESTS=ON'
|
||||||
name: Linux and Tests on ${{ matrix.lua }}
|
name: Linux and Tests on ${{ matrix.lua }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3 # Keeps the git OAuth token after checkout
|
- uses: actions/checkout@v3 # Keeps the git OAuth token after checkout
|
||||||
- name: Install ${{ matrix.lua }} ${{ matrix.animview }}
|
- name: Install ${{ matrix.lua }} ${{ matrix.animviewreqs }}
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install ${{ matrix.packages }} luarocks
|
sudo apt-get install ${{ matrix.packages }} luarocks
|
||||||
@@ -53,19 +54,19 @@ jobs:
|
|||||||
- name: Install static analysis requirements
|
- name: Install static analysis requirements
|
||||||
if: matrix.static_analysis
|
if: matrix.static_analysis
|
||||||
run: |
|
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
|
sudo pip3 install -I codespell==2.2 cmakelint==1.4
|
||||||
|
|
||||||
# Build catch2
|
# Build Catch2
|
||||||
git clone --quiet https://github.com/catchorg/Catch2 \
|
git clone --quiet https://github.com/catchorg/Catch2 \
|
||||||
--branch v3.1.1 --depth=1
|
--branch v3.4.0 --depth=1 ../Catch2
|
||||||
cd Catch2
|
mkdir ../Catch2/build
|
||||||
cmake . -Bbuild
|
cd ../Catch2/build
|
||||||
cd build
|
cmake .. -B.
|
||||||
sudo make install
|
sudo make install
|
||||||
cd ../../
|
|
||||||
rm -rf Catch2
|
sudo luarocks --lua-version 5.4 install luafilesystem
|
||||||
|
|
||||||
- name: Install CMake 3.10
|
- name: Install CMake 3.10
|
||||||
if: matrix.cmake
|
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
|
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
|
sudo bash cmake.sh --prefix=/usr/local/ --exclude-subdir --skip-license
|
||||||
cmake --version
|
cmake --version
|
||||||
- name: Create CorsixTH ${{ matrix.animview }} makefiles with ${{ matrix.lua }}
|
- name: Create CorsixTH${{ matrix.animview }} makefiles with ${{ matrix.lua }}
|
||||||
run: |
|
run: |
|
||||||
cmake . -G"Unix Makefiles" -Bbuild --debug-output \
|
cmake . -G"Unix Makefiles" -Bbuild --debug-output -LA \
|
||||||
-DWITH_AUDIO=ON -DWITH_MOVIES=ON ${{ matrix.catch2 }} \
|
-DWITH_AUDIO=ON -DWITH_MOVIES=ON ${{ matrix.catch2 }} \
|
||||||
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON ${{ matrix.cmakejit }}
|
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON ${{ matrix.cmakejit }}
|
||||||
- name: Build CorsixTH ${{ matrix.animview }} with ${{ matrix.lua }}
|
- name: Build CorsixTH${{ matrix.animview }} with ${{ matrix.lua }}
|
||||||
run: |
|
run: |
|
||||||
cmake --build build/ -- VERBOSE=1
|
cmake --build build/ -- VERBOSE=1
|
||||||
sudo cmake --build build/ -- install
|
sudo cmake --build build/ -- install
|
||||||
@@ -118,18 +119,23 @@ jobs:
|
|||||||
libs/CMakeLists.txt libs/rnc/CMakeLists.txt \
|
libs/CMakeLists.txt libs/rnc/CMakeLists.txt \
|
||||||
CMake/GenerateDoc.cmake CMake/PrecompiledDeps.cmake CMake/VcpkgDeps.cmake
|
CMake/GenerateDoc.cmake CMake/PrecompiledDeps.cmake CMake/VcpkgDeps.cmake
|
||||||
# Validate these build files
|
# 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
|
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
|
- name: Run clang code tests
|
||||||
if: matrix.static_analysis
|
if: matrix.static_analysis
|
||||||
run: |
|
run: |
|
||||||
# Check cpp format
|
# Check cpp format
|
||||||
clang-format-11 -i CorsixTH/Src/*.cpp CorsixTH/Src/*.h AnimView/*.cpp \
|
clang-format-11 -i CorsixTH/Src/*.cpp CorsixTH/Src/*.h AnimView/*.cpp \
|
||||||
AnimView/*.h libs/rnc/*.cpp libs/rnc/*.h CorsixTH/SrcUnshared/main.cpp
|
AnimView/*.h libs/rnc/*.cpp libs/rnc/*.h CorsixTH/SrcUnshared/main.cpp
|
||||||
git diff --exit-code
|
git diff
|
||||||
# Clang-tidy linter
|
# Clang-tidy linter
|
||||||
clang-tidy-11 -p build --warnings-as-errors=\* \
|
clang-tidy-11 -p build --warnings-as-errors=\* \
|
||||||
CorsixTH/Src/*.c CorsixTH/Src/*.cpp libs/rnc/*.cpp CorsixTH/SrcUnshared/main.cpp
|
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
|
- name: Generate documentation
|
||||||
if: matrix.docs
|
if: matrix.docs
|
||||||
run: |
|
run: |
|
||||||
|
@@ -92,8 +92,8 @@ prevent_edge_scrolling = false
|
|||||||
capture_mouse = true
|
capture_mouse = true
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
-- Right Mouse Panning: By default, it is disabled (right_mouse_scrolling = false).
|
-- Right Mouse Scrolling: By default, it is disabled (right_mouse_scrolling = false).
|
||||||
-- This means that the default panning method is pressing the middle mouse button.
|
-- This means that the default scrolling method is pressing the middle mouse button.
|
||||||
--
|
--
|
||||||
right_mouse_scrolling = false
|
right_mouse_scrolling = false
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user