Platform/Qt: cleanup sprite viewer #1391
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: [push, pull_request, workflow_dispatch] | |
jobs: | |
build-win64: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
install: make mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-SDL2 mingw-w64-x86_64-glew mingw-w64-x86_64-qt5-static | |
- name: Build NanoBoyAdvance | |
run: | | |
cmake \ | |
-Bbuild \ | |
-G"Unix Makefiles" \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_CXX_FLAGS="-s" \ | |
-DPLATFORM_QT_STATIC=ON \ | |
-DUSE_STATIC_SDL=ON \ | |
-DGLEW_USE_STATIC_LIBS=ON \ | |
-DQT5_STATIC_DIR="/c/tools/msys64/mingw64/qt5-static" | |
cd build | |
make -j$NUMBER_OF_PROCESSORS | |
- name: Collect artifacts | |
run: | | |
mkdir upload | |
cp -r build/bin/qt/{NanoBoyAdvance.exe,config.toml} upload | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: NanoBoyAdvance-win64 | |
path: upload | |
if-no-files-found: error | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup dependencies | |
run: | | |
sudo apt-get update -qq | |
sudo apt-get install -y libsdl2-dev libglew-dev qtbase5-dev | |
- name: Build NanoBoyAdvance | |
run: | | |
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release | |
cd build | |
make -j$(nproc) | |
- name: Collect artifacts | |
run: | | |
mkdir upload | |
cp -r build/bin/qt/{NanoBoyAdvance,config.toml} upload | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: NanoBoyAdvance-linux | |
path: upload | |
if-no-files-found: error | |
build-macOS: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup dependencies | |
env: | |
HOMEBREW_NO_ANALYTICS: 1 | |
run: brew install sdl2 glew qt@5 | |
- name: Build NanoBoyAdvance | |
run: | | |
cmake -Bbuild \ | |
-DCMAKE_CXX_FLAGS="-s" \ | |
-DUSE_STATIC_SDL=ON \ | |
-DGLEW_USE_STATIC_LIBS=ON \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DCMAKE_PREFIX_PATH="$(brew --prefix qt@5);$(brew --prefix glew)" \ | |
-DMACOS_BUILD_APP_BUNDLE=ON \ | |
-DMACOS_BUNDLE_QT=ON | |
cd build | |
make -j$(getconf _NPROCESSORS_ONLN) | |
- name: Create disk image | |
run: | | |
mkdir dmg | |
cp -a build/bin/qt/NanoBoyAdvance.app dmg/NanoBoyAdvance.app | |
codesign -s - --deep -f dmg/NanoBoyAdvance.app | |
ln -s /Applications dmg/Applications | |
hdiutil create \ | |
-fs HFS+ \ | |
-volname NanoBoyAdvance \ | |
-srcfolder dmg \ | |
-ov -format UDBZ \ | |
NanoBoyAdvance.dmg | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: NanoBoyAdvance-${{ runner.os }} | |
path: NanoBoyAdvance.dmg | |
if-no-files-found: error |