65 lines
2.4 KiB
YAML
65 lines
2.4 KiB
YAML
name: Switchres CIv2
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
buildx86_64:
|
|
runs-on: ubuntu-latest
|
|
name: ${{ matrix.platform.name }} ${{ matrix.config.name }}
|
|
strategy:
|
|
matrix:
|
|
platform:
|
|
- { name: Linux GCC }
|
|
- { name: Windows MINGW, make_opts: PLATFORM=NT CROSS_COMPILE=x86_64-w64-mingw32- }
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install Linux dependencies
|
|
if: matrix.platform.name == 'Linux GCC'
|
|
run: sudo apt-get install libxrandr-dev libdrm-dev libsdl2-dev
|
|
- name: Install Windows dependencies
|
|
if: matrix.platform.name == 'Windows MINGW'
|
|
run: |
|
|
sudo apt-get install mingw-w64 wget tar
|
|
sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix
|
|
wget https://github.com/libsdl-org/SDL/releases/download/release-2.26.2/SDL2-devel-2.26.2-mingw.tar.gz
|
|
tar xvzf SDL2-devel-2.26.2-mingw.tar.gz
|
|
sudo make -C SDL2-2.26.2 CROSS_PATH=/usr ARCHITECTURES=x86_64-w64-mingw32 cross
|
|
wget https://github.com/libsdl-org/SDL_ttf/releases/download/release-2.20.1/SDL2_ttf-devel-2.20.1-mingw.tar.gz
|
|
tar xvzf SDL2_ttf-devel-2.20.1-mingw.tar.gz
|
|
sudo make -C SDL2_ttf-2.20.1 CROSS_PATH=/usr ARCHITECTURES=x86_64-w64-mingw32 cross
|
|
- name: Build libs and binary
|
|
run: |
|
|
make libswitchres ${{matrix.platform.make_opts}}
|
|
make ${{matrix.platform.make_opts}}
|
|
- name: Build grid.exe (Windows only)
|
|
if: matrix.platform.name == 'Windows MINGW'
|
|
run: |
|
|
make ${{matrix.platform.make_opts}} clean
|
|
make ${{matrix.platform.make_opts}} grid
|
|
- name: Prepare artifacts
|
|
run: mkdir artifacts && cp -v libswitchres.{so,a,dll,lib} switchres{,.exe,.ini} grid{,.exe} /usr/x86_64-w64-mingw32/bin/SDL2{,_ttf}.dll /usr/x86_64-w64-mingw32/lib/libwinpthread-1.dll artifacts/ || true
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3.1.0
|
|
with:
|
|
name: switchres-${{matrix.platform.name}}-x86_64
|
|
path: artifacts/
|
|
|
|
win32-build-x86_64-geometry:
|
|
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
- name: Build geometry.exe
|
|
run: |
|
|
pip install pyinstaller
|
|
pyinstaller --onefile geometry.py --icon=tv.ico
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3.1.0
|
|
with:
|
|
name: geometry-win32-x86_64
|
|
path: dist/
|