Merge pull request #189 from networkfusion/github-actions

Add Github Action workflows
This commit is contained in:
Simon Eriksson 2021-06-23 20:12:40 +02:00 committed by GitHub
commit 5503dd0efb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 118 additions and 5 deletions

21
.github/workflows/debian-linux.yml vendored Normal file
View file

@ -0,0 +1,21 @@
name: debian-linux
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Installing Dependencies
run: |
sudo apt-get update
sudo apt-get install -y freeglut3 freeglut3-dev libglew1.5 libglew1.5-dev libglu1-mesa libglu1-mesa-dev libgl1-mesa-glx libgl1-mesa-dev libpulse-dev libalut-dev mesa-common-dev libopenal-dev
- name: Build
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make VERBOSE=1 -j4

89
.github/workflows/msys2-windows.yml vendored Normal file
View file

@ -0,0 +1,89 @@
name: msys2-windows
on:
push:
pull_request:
jobs:
build:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include: [
{ msystem: MINGW64, arch: x86_64, extensions: AVX },
{ msystem: MINGW64, arch: x86_64, extensions: Native }
]
steps:
- uses: actions/checkout@v2
with:
path: temp
fetch-depth: 0
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
install: >-
curl
p7zip
git
sed
base-devel
mingw-w64-${{ matrix.arch }}-cmake
mingw-w64-${{ matrix.arch }}-toolchain
update: true
- name: Move Checkout
run: |
Copy-Item -Path ".\temp" -Destination "C:\_" -Recurse
New-Item -Path "C:\_" -Name "build" -ItemType "directory"
- name: Get OpenAL
shell: msys2 {0}
run: |
curl -SL -o openal-soft.zip https://openal-soft.org/openal-binaries/openal-soft-1.21.0-bin.zip
7z x openal-soft.zip
cd openal-soft-1.21.0-bin
ls
mkdir /C/_/openal/
mkdir /C/_/openal/include/
cp -R ./include/AL/. /C/_/openal/include/
mkdir /C/_/openal/lib/
cp -R ./libs/Win64/. /C/_/openal/lib/
cp -R ./bin/Win64/soft_oal.dll /C/_/build/OpenAL32.dll
cd ..
- name: Correct pthread to allow static
shell: msys2 {0}
run: |
sed -z 's/#else\n#define WINPTHREAD_API __declspec(dllimport)/#else\n#define WINPTHREAD_API/' /mingw64/x86_64-w64-mingw32/include/pthread.h
- name: Build iconv static lib
shell: msys2 {0}
run: |
curl -SL http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz | tar -xz -C .
cd libiconv-1.16
./configure --prefix=/mingw64/local --disable-shared --enable-static
make
make install-strip
cd ..
- name: Build CEN64
shell: msys2 {0}
run: |
cd /C/_
cd build
cmake -DCMAKE_FIND_LIBRARY_SUFFIXES='.a' -DICONV_INCLUDE_DIR:PATH=/mingw64/local/include -DICONV_LIBRARIES:FILEPATH=/mingw64/local/lib/libiconv.a -DOPENAL_INCLUDE_DIR:PATH=/C/_/openal/include -DOPENAL_LIBRARY:FILEPATH=/C/_/openal/lib/libOpenAL32.dll.a -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchains/mingw64-${{ matrix.arch }}.cmake -DCEN64_ARCH_SUPPORT:STRING=${{ matrix.extensions }} -DCMAKE_BUILD_TYPE=Release -G 'Unix Makefiles' ..
make VERBOSE=1 -j4
- name: "Upload executable"
uses: actions/upload-artifact@v2
with:
name: windows-${{ matrix.arch }}-${{ matrix.extensions }}
path: C:/_/build/*.exe
- name: "Upload dll"
uses: actions/upload-artifact@v2
with:
name: windows-${{ matrix.arch }}-${{ matrix.extensions }}
path: C:/_/build/*.dll

View file

@ -65,8 +65,8 @@ To build for Windows on Windows XP..10, do:
* Press enter a few times to finish the install
2. Extract contents of "mingw64" directory to "MSYS\mingw" directory: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/8.1.0/threads-posix/seh/x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z
3. Copy "MSYS\mingw\bin\mingw32-make.exe" to "MSYS\mingw\bin\make.exe"
4. Extract OpenAL "bin, libs, include" directories to "MSYS\mingw\x86_64-w64-mingw32" directory: https://kcat.strangesoft.net/openal-binaries/openal-soft-1.19.1-bin.zip
5. Extract iconv to "MSYS\home\yourname\libiconv" directory: https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz
4. Extract OpenAL "bin, libs, include" directories to "MSYS\mingw\x86_64-w64-mingw32" directory: https://openal-soft.org/openal-binaries/openal-soft-1.21.0-bin.zip
5. Extract iconv to "MSYS\home\yourname\libiconv" directory: https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
6. Run MSYS & type "cd libiconv" Enter, followed by "./configure --disable-shared" Enter, followed by "make install" Enter
7. Extract CMake "bin, doc, man, share" directories to "MSYS" directory: https://github.com/Kitware/CMake/releases/download/v3.13.4/cmake-3.13.4-win64-x64.zip
8. Extract CEN64 source to "MSYS\home\yourname\cen64" directory: https://github.com/n64dev/cen64

View file

@ -2,9 +2,12 @@
set(CMAKE_SYSTEM_NAME Windows)
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
SET(PREFIX x86_64-w64-mingw32)
SET(CMAKE_C_COMPILER ${PREFIX}-gcc)
SET(CMAKE_CXX_COMPILER ${PREFIX}-g++)
SET(CMAKE_AR ${PREFIX}-gcc-ar)
SET(CMAKE_NM ${PREFIX}-gcc-nm)
SET(CMAKE_RC_COMPILER ${PREFIX}-windres)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)