touch hold buttons to right click #1303
This file contains hidden or 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
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| name: Build (all target platforms) | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_call: | |
| secrets: | |
| KEYSTORE: | |
| required: true | |
| SIGNING_KEY_ALIAS: | |
| required: true | |
| SIGNING_KEY_PASSWORD: | |
| required: true | |
| SIGNING_STORE_PASSWORD: | |
| required: true | |
| env: | |
| GIT_HASH: ${{ github.sha }} | |
| GIT_BRANCH: ${{ github.head_ref || github.ref_name }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-windows-x86: | |
| uses: ./.github/workflows/windows-build.yml | |
| with: | |
| build-arch: x86 | |
| build-windows-x64: | |
| uses: ./.github/workflows/windows-build.yml | |
| with: | |
| build-arch: x64 | |
| build-windows-arm64: | |
| uses: ./.github/workflows/windows-build.yml | |
| with: | |
| build-arch: ARM64 | |
| #required for 1.0 autoupdater. get rid of this some day | |
| windows-post-under-older-url: | |
| needs: build-windows-x64 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: download windows x64 | |
| uses: actions/download-artifact@v8 | |
| with: | |
| skip-decompress: true | |
| name: voidsprite-build-win-x64 | |
| - name: rename | |
| run: mv voidsprite-build-win-x64.zip voidsprite-build-win64.zip | |
| - name: reupload windows x64 under older name | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| archive: false | |
| path: voidsprite-build-win64.zip | |
| build-sdk: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: run script | |
| working-directory: ${{env.GITHUB_WORKSPACE}} | |
| run: ./make_sdk.ps1 | |
| - name: Push build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: voidsprite-sdk | |
| path: | | |
| voidsprite_sdk.h | |
| build-linux64-flatpak: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/flathub-infra/flatpak-github-actions:freedesktop-24.08 | |
| options: --privileged | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - uses: flathub-infra/flatpak-github-actions/flatpak-builder@master | |
| with: | |
| bundle: voidsprite-build-linux64-flatpak.flatpak | |
| manifest-path: freesprite/linux/flatpak/com.github.counter185.voidsprite.yml | |
| cache-key: flatpak-builder-${{ github.sha }} | |
| build-linux-appimage-x64: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: install pkgs | |
| run: sudo apt update && sudo apt install cmake clang python3 python3-pip zsync nasm | |
| - name: install sdl devlibs | |
| run: sudo apt-get install build-essential pkg-config ninja-build gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev libfribidi-dev libjack-dev libsndio-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev libthai-dev libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev libfreetype-dev | |
| - name: setup cmake | |
| working-directory: ${{env.GITHUB_WORKSPACE}} | |
| run: mkdir build_appimage | |
| - name: build | |
| working-directory: ${{env.GITHUB_WORKSPACE}} | |
| run: cd build_appimage && CC=clang CXX=clang++ cmake .. -DRELEASE=ON -DVSP_DISCORD_RPC=ON && make -j4 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| cache: 'pip' | |
| - run: pip install git+https://github.com/AppImageCrafters/appimage-builder.git | |
| - name: appimage | |
| working-directory: ${{env.GITHUB_WORKSPACE}} | |
| run: chmod +x ./setup_appimage.sh && ./setup_appimage.sh | |
| - name: Push build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: voidsprite-build-linux-appimage-x64 | |
| path: | | |
| voidsprite-latest-x86_64.AppImage | |
| build-mac-x64: | |
| runs-on: macos-15-intel | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install clang | |
| run: brew install llvm | |
| - name: install pkgconfig and cmake | |
| run: brew install pkgconfig | |
| - name: install devlibs | |
| run: brew install meson sdl3 sdl3_image sdl3_ttf jpeg-xl | |
| - name: run build | |
| run: chmod +x ./mac_build.sh && chmod +x ./mac_make_app.sh && CC=clang CXX=clang++ ./mac_build.sh | |
| - name: workaround gh actions artifact file permissions | |
| run: tar -cvf voidsprite.app.tar -C target/mac_release . | |
| - name: Push build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: voidsprite-build-mac-intel64 | |
| retention-days: 1 | |
| path: | | |
| voidsprite.app.tar | |
| build-mac-arm64: | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install clang | |
| run: brew install llvm | |
| - name: install pkgconfig and cmake | |
| run: brew install pkgconfig | |
| - name: install devlibs | |
| run: brew install meson sdl3 sdl3_image sdl3_ttf jpeg-xl | |
| - name: run build | |
| run: chmod +x ./mac_build.sh && chmod +x ./mac_make_app.sh && CC=clang CXX=clang++ ./mac_build.sh | |
| - name: workaround gh actions artifact file permissions | |
| run: tar -cvf voidsprite.app.tar -C target/mac_release . | |
| - name: Push build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: voidsprite-build-mac-arm64 | |
| retention-days: 1 | |
| path: | | |
| voidsprite.app.tar | |
| mac-merge-into-universal: | |
| runs-on: macos-15 | |
| needs: [build-mac-x64, build-mac-arm64] | |
| steps: | |
| - name: download x64 build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: voidsprite-build-mac-intel64 | |
| - name: rename x64 build | |
| run: | | |
| mv voidsprite.app.tar voidsprite-x64.app.tar | |
| - name: download arm64 build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: voidsprite-build-mac-arm64 | |
| - name: rename arm64 build | |
| run: | | |
| mv voidsprite.app.tar voidsprite-arm64.app.tar | |
| - name: unpack | |
| run: | | |
| mkdir x64 && mkdir arm64 | |
| tar -xvf voidsprite-x64.app.tar -C ./x64 | |
| tar -xvf voidsprite-arm64.app.tar -C ./arm64 | |
| - name: merge | |
| run: | | |
| lipo -create -output voidsprite ./x64/voidsprite.app/Contents/MacOS/voidsprite ./arm64/voidsprite.app/Contents/MacOS/voidsprite | |
| mkdir voidsprite-universal.app | |
| mkdir voidsprite-universal.app/Contents | |
| mkdir voidsprite-universal.app/Contents/MacOS | |
| mkdir voidsprite-universal.app/Contents/MacOS/assets | |
| mkdir voidsprite-universal.app/Contents/Resources | |
| cp -R ./x64/voidsprite.app/OPEN_SOURCE_LICENSES voidsprite-universal.app/OPEN_SOURCE_LICENSES | |
| cp -R ./x64/voidsprite.app/Contents/Resources/* voidsprite-universal.app/Contents/Resources/ | |
| cp -R ./x64/voidsprite.app/Contents/Resources/* voidsprite-universal.app/Contents/Resources/ | |
| cp -R ./x64/voidsprite.app/Contents/MacOS/*.ttf voidsprite-universal.app/Contents/MacOS/ | |
| cp -R ./x64/voidsprite.app/Contents/MacOS/assets/* voidsprite-universal.app/Contents/MacOS/assets/ | |
| cp ./x64/voidsprite.app/Contents/Info.plist voidsprite-universal.app/Contents/Info.plist | |
| cp voidsprite voidsprite-universal.app/Contents/MacOS/voidsprite | |
| find ./arm64/voidsprite.app/ -name "*.dylib" -exec basename {} \; | xargs -S 1024 -n1 -I@ sh -c 'if [ ! -f ./x64/voidsprite.app/Contents/MacOS/@ ]; then cp ./arm64/voidsprite.app/Contents/MacOS/@ ./voidsprite-universal.app/Contents/MacOS/@ ; fi' | |
| find ./x64/voidsprite.app/ -name "*.dylib" -exec basename {} \; | xargs -S 1024 -n1 -I@ sh -c 'if [ ! -f ./arm64/voidsprite.app/Contents/MacOS/@ ]; then cp ./x64/voidsprite.app/Contents/MacOS/@ ./voidsprite-universal.app/Contents/MacOS/@ ; fi' | |
| find ./x64/voidsprite.app/ -name "*.dylib" -exec basename {} \; | xargs -S 1024 -n1 -I@ sh -c 'if [ -f ./arm64/voidsprite.app/Contents/MacOS/@ ]; then lipo ./x64/voidsprite.app/Contents/MacOS/@ ./arm64/voidsprite.app/Contents/MacOS/@ -output ./voidsprite-universal.app/Contents/MacOS/@ -create; fi' | |
| chmod +x ./voidsprite-universal.app/Contents/MacOS/voidsprite | |
| - name: create tar | |
| run: | | |
| mkdir mac-release | |
| mv voidsprite-universal.app mac-release/voidsprite-universal.app | |
| tar -cvf voidsprite-universal.app.tar -C mac-release . | |
| - name: Push build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: voidsprite-build-mac-universal | |
| path: | | |
| voidsprite-universal.app.tar | |
| build-emscipten: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - uses: mymindstorm/setup-emsdk@v14 | |
| - name: setup cmake | |
| working-directory: ${{env.GITHUB_WORKSPACE}} | |
| run: ./setup_emscripten.sh | |
| - name: setup emscripten build | |
| working-directory: ${{env.GITHUB_WORKSPACE}} | |
| run: cd build_em && emmake make -j4 | |
| - name: gather artifacts | |
| working-directory: ${{env.GITHUB_WORKSPACE}} | |
| run: | | |
| cp build_em/cmake/voidsprite.js web-build/voidsprite.js | |
| cp build_em/cmake/voidsprite.wasm web-build/voidsprite.wasm | |
| cp -R OPEN_SOURCE_LICENSES web-build/OPEN_SOURCE_LICENSES | |
| # html is already in the folder | |
| - name: Push build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: voidsprite-build-emscripten | |
| path: web-build | |
| build-android-x64: | |
| uses: ./.github/workflows/android-build.yml | |
| secrets: | |
| KEYSTORE: ${{ secrets.KEYSTORE }} | |
| SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
| SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
| SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
| with: | |
| build-arch: x86_64 | |
| build-android-arm64: | |
| uses: ./.github/workflows/android-build.yml | |
| secrets: | |
| KEYSTORE: ${{ secrets.KEYSTORE }} | |
| SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
| SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
| SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
| with: | |
| build-arch: arm64-v8a | |
| build-android-armv7: | |
| uses: ./.github/workflows/android-build.yml | |
| secrets: | |
| KEYSTORE: ${{ secrets.KEYSTORE }} | |
| SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
| SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
| SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
| with: | |
| build-arch: armeabi-v7a | |
| android-merge-cpu-apks: | |
| needs: [build-android-x64, build-android-arm64, build-android-armv7] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| with: | |
| packages: 'platform-tools build-tools;36.1.0' | |
| log-accepted-android-sdk-licenses: false | |
| - name: Decode Keystore | |
| env: | |
| ENCODED_STRING: ${{ secrets.KEYSTORE }} | |
| run: | | |
| echo $ENCODED_STRING | base64 -di > vsp_keystore.jks | |
| - name: download x64 build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: voidsprite-build-android-x86_64 | |
| - name: rename x64 build | |
| run: mv voidsprite-release.apk voidsprite-x86_64.apk | |
| - name: download arm64 build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: voidsprite-build-android-arm64-v8a | |
| - name: rename arm64 build | |
| run: mv voidsprite-release.apk voidsprite-arm64-v8a.apk | |
| - name: download armv7 build | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: voidsprite-build-android-armeabi-v7a | |
| - name: rename armv7 build | |
| run: mv voidsprite-release.apk voidsprite-armeabi-v7a.apk | |
| - name: merge all the apks | |
| env: | |
| SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }} | |
| SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
| SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }} | |
| run: | | |
| mkdir outapk | |
| unzip voidsprite-x86_64.apk '*' -d outapk | |
| unzip voidsprite-arm64-v8a.apk 'lib/*' -d outapk | |
| unzip voidsprite-armeabi-v7a.apk 'lib/*' -d outapk | |
| cd outapk && zip -n "resources.arsc" -r ../voidsprite-release.apk * && cd .. && rm -rf outapk | |
| $ANDROID_HOME/build-tools/36.1.0/zipalign -P 16 -f -v 4 voidsprite-release.apk voidsprite-release-aligned.apk | |
| $ANDROID_HOME/build-tools/36.1.0/apksigner sign --ks vsp_keystore.jks --ks-key-alias $SIGNING_KEY_ALIAS --ks-pass env:SIGNING_STORE_PASSWORD --key-pass env:SIGNING_KEY_PASSWORD voidsprite-release-aligned.apk | |
| mkdir output | |
| mv voidsprite-release-aligned.apk ./output/voidsprite-release.apk | |
| cp -r OPEN_SOURCE_LICENSES ./output/OPEN_SOURCE_LICENSES | |
| - name: Push build artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: voidsprite-build-android | |
| path: | | |
| output | |