#name: Build #on: [push, workflow_dispatch] # pull_request # TODO(Gloria): use CPack for packaging #jobs: # build-windows: # runs-on: [windows-amd64, self-hosted] # steps: # - uses: actions/checkout@v6 # - name: Configure # run: cmake -B build -G Ninja "-DSDL3_DIR=C:\Libraries\SDL3-3.4.8\cmake" "-DQt6_DIR=C:\Qt\6.11.1\msvc2022_64\lib\cmake\Qt6" -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release # - name: Build # run: cmake --build build -j $([Environment]::ProcessorCount) # - name: Deploy # run: | # cmake --install build --prefix $PWD/upload # Move-Item upload\bin\* upload\ # Remove-Item upload\bin,upload\D3Dcompiler_47.dll,upload\dxcompiler.dll,upload\opengl32sw.dll,upload\qt.conf # Copy-Item C:\Libraries\SDL3-3.4.8\lib\SDL3.dll upload\ # - name: Upload artifacts # uses: actions/upload-artifact@v3 # with: # name: NanoBoyAdvance-${{ runner.os }}-${{ runner.arch }} # path: upload # if-no-files-found: error # build-linux: # runs-on: [linux-amd64, self-hosted] # steps: # - uses: actions/checkout@v6 # - name: Configure # run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXE_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_SHARED_LINKER_FLAGS_INIT="-fuse-ld=lld" -DCMAKE_MODULE_LINKER_FLAGS_INIT="-fuse-ld=lld" # - name: Build # run: cmake --build build -j $(nproc) # - name: Deploy # env: # EXTRA_PLATFORM_PLUGINS: libqwayland.so # EXTRA_QT_PLUGINS: core;dbus;gui;waylandcompositor;widgets # QMAKE: /usr/lib/qt6/bin/qmake # LDAI_COMP: zstd # run: | # mkdir -p AppDir/usr/bin AppDir/usr/share/applications AppDir/usr/share/icons/hicolor/128x128/apps # cp -r build/Sources/NanoBoyAdvanceQt/Release/NanoBoyAdvance AppDir/usr/bin/ # cp -r Sources/NanoBoyAdvanceQt/BuildContent/eu.nanoboyadvance.nanoboyadvance.desktop AppDir/usr/share/applications/ # cp -r Sources/NanoBoyAdvanceQt/Content/NanoBoyAdvance.png AppDir/usr/share/icons/hicolor/128x128/apps/eu.nanoboyadvance.nanoboyadvance.png # /usr/local/bin/linuxdeploy --appdir AppDir --plugin qt --output appimage # - name: Upload artifacts # uses: actions/upload-artifact@v3 # with: # name: NanoBoyAdvance-${{ runner.os }}-${{ runner.arch }} # path: NanoBoyAdvance*.AppImage # archive: false # if-no-files-found: error # build-macos: # runs-on: [macos-arm64, self-hosted] # steps: # - uses: actions/checkout@v6 # - name: Configure # run: cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release # - name: Build # run: cmake --build build -j $(sysctl -n hw.logicalcpu) # - name: Deploy # run: | # cmake --install build --prefix install # mkdir install-disk # cp -r install/NanoBoyAdvance.app install-disk/ # codesign -s - --deep -f install-disk/NanoBoyAdvance.app # ln -s /Applications install-disk/Applications # hdiutil create -fs HFS+ -volname NanoBoyAdvance -srcfolder install-disk -ov -format UDBZ NanoBoyAdvance.dmg # - name: Upload artifacts # uses: actions/upload-artifact@v3 # with: # name: NanoBoyAdvance-${{ runner.os }}-${{ runner.arch }} # path: NanoBoyAdvance.dmg # archive: false # if-no-files-found: error