summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbriaguya <70942617+briaguya-ai@users.noreply.github.com>2025-07-18 21:09:58 -0400
committerLywx <kiritodev01@gmail.com>2025-07-18 20:07:51 -0600
commit154e779234737064083d798c1f86937c52a18407 (patch)
tree5e02b54f035958eb0e5b3007b687ecb7ba6111ca
parentfd321f151ed6c734648df30ce708d83332b18fd9 (diff)
add some stuff back
-rw-r--r--.github/workflows/main.yml286
1 files changed, 286 insertions, 0 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index e35454bbb..47bbe8dcd 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -44,6 +44,292 @@ jobs:
path: spaghetti.o2r
retention-days: 1
+ build-windows:
+ needs: generate-port-o2r
+ runs-on: windows-2022
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ fetch-tags: true
+ submodules: recursive
+ - name: Build
+ run: |
+ cmake -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A x64 -DCMAKE_BUILD_TYPE=Release
+ cmake --build ./build/x64 --config Release --parallel 10
+ - name: Download spaghetti.o2r
+ uses: actions/download-artifact@v4
+ with:
+ name: spaghetti.o2r
+ path: ./build/x64/Release
+ - name: Create Package
+ run: |
+ mkdir spaghetti-release
+ mv build/x64/Release/Spaghettify.exe spaghetti-release/
+ mv build/x64/Release/spaghetti.o2r spaghetti-release/
+ mv config.yml spaghetti-release/
+ mv yamls spaghetti-release/
+ Invoke-WebRequest -Uri "https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt" -OutFile "spaghetti-release/gamecontrollerdb.txt"
+ - name: Upload build
+ uses: actions/upload-artifact@v4
+ with:
+ name: spaghetti-windows
+ path: spaghetti-release
+
+ build-macos:
+ needs: generate-port-o2r
+ runs-on: macOS-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ fetch-tags: true
+ submodules: recursive
+ - name: Install dependencies
+ run: brew install ninja cmake
+ - name: Install vcpkg
+ uses: lukka/run-vcpkg@v11.5
+ with:
+ vcpkgDirectory: '${{ github.workspace }}/vcpkg'
+ - name: Build
+ run: |
+ cmake -H. -Bbuild-cmake -GNinja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
+ cmake --build build-cmake --config Release -j3
+ - name: Download spaghetti.o2r
+ uses: actions/download-artifact@v4
+ with:
+ name: spaghetti.o2r
+ path: ./build-cmake
+ - name: Create Package
+ run: |
+ mkdir spaghetti-release
+ mv build-cmake/Spaghettify spaghetti-release/
+ mv build-cmake/spaghetti.o2r spaghetti-release/
+ mv config.yml spaghetti-release/
+ mv yamls spaghetti-release/
+ wget -O spaghetti-release/gamecontrollerdb.txt https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt
+ - name: Publish packaged artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: spaghetti-mac-x64
+ path: spaghetti-release
+
+ build-linux:
+ needs: generate-port-o2r
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ fetch-tags: true
+ submodules: recursive
+ - name: Update machine
+ run: sudo apt update
+ - name: Install dependencies
+ run: sudo apt-get install gcc g++ git cmake ninja-build lsb-release libsdl2-dev libsdl2-net-dev libpng-dev libsdl2-net-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev libtinyxml2-dev libspdlog-dev libboost-dev libopengl-dev libogg-dev libvorbis-dev
+ - name: ccache
+ uses: hendrikmuhs/ccache-action@v1.2.14
+ with:
+ key: linux-ccache-${{ github.ref }}-${{ github.sha }}
+ restore-keys: |
+ linux-ccache-${{ github.ref }}
+ linux-ccache-
+ - name: Cache build folders
+ uses: actions/cache@v4
+ with:
+ key: linux-build-${{ github.ref }}-${{ github.sha }}
+ restore-keys: |
+ linux-build-${{ github.ref }}
+ linux-build-
+ path: |
+ SDL2-2.30.3
+ tinyxml2-10.0.0
+ libzip-1.10.1
+ - name: Install latest SDL
+ run: |
+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
+ if [ ! -d "SDL2-2.30.3" ]; then
+ wget https://www.libsdl.org/release/SDL2-2.30.3.tar.gz
+ tar -xzf SDL2-2.30.3.tar.gz
+ fi
+ cd SDL2-2.30.3
+ ./configure --enable-hidapi-libusb
+ make -j 10
+ sudo make install
+ sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/
+ - name: Install latest tinyxml2
+ run: |
+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
+ wget https://github.com/leethomason/tinyxml2/archive/refs/tags/10.0.0.tar.gz
+ tar -xzf 10.0.0.tar.gz
+ cd tinyxml2-10.0.0
+ mkdir -p build
+ cd build
+ cmake ..
+ make
+ sudo make install
+ - name: Install libzip without crypto
+ run: |
+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
+ if [ ! -d "libzip-1.10.1" ]; then
+ wget https://github.com/nih-at/libzip/releases/download/v1.10.1/libzip-1.10.1.tar.gz
+ tar -xzf libzip-1.10.1.tar.gz
+ fi
+ cd libzip-1.10.1
+ mkdir -p build
+ cd build
+ cmake .. -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF
+ make
+ sudo make install
+ sudo cp -av /usr/local/lib/libzip* /lib/x86_64-linux-gnu/
+ - name: Download spaghetti.o2r
+ uses: actions/download-artifact@v4
+ with:
+ name: spaghetti.o2r
+ path: ./build-cmake
+ - name: Build
+ run: |
+ cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release
+ cmake --build build-cmake --config Release -j3
+ (cd build-cmake && cpack -G External)
+ wget -O gamecontrollerdb.txt https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt
+ mv README.md readme.txt
+ mv build-cmake/*.appimage spaghetti.appimage
+ # - name: Upload build
+ # uses: actions/upload-artifact@v4
+ # with:
+ # name: Spaghettify-linux
+ # path: |
+ # spaghetti.appimage
+ # config.yml
+ # yamls
+ # gamecontrollerdb.txt
+
+ build-linux-old:
+ needs: generate-port-o2r
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ fetch-tags: true
+ submodules: recursive
+ - name: Update machine
+ run: sudo apt update
+ - name: Install dependencies
+ run: sudo apt-get install gcc g++ git cmake ninja-build lsb-release libsdl2-dev libsdl2-net-dev libpng-dev libsdl2-net-dev libzip-dev zipcmp zipmerge ziptool nlohmann-json3-dev libtinyxml2-dev libspdlog-dev libboost-dev libopengl-dev libogg-dev libvorbis-dev
+ - name: ccache
+ uses: hendrikmuhs/ccache-action@v1.2.14
+ with:
+ key: linux-old-ccache-${{ github.ref }}-${{ github.sha }}
+ restore-keys: |
+ linux-old-ccache-${{ github.ref }}
+ linux-old-ccache-
+ - name: Cache build folders
+ uses: actions/cache@v4
+ with:
+ key: linux-old-build-${{ github.ref }}-${{ github.sha }}
+ restore-keys: |
+ linux-build-old-${{ github.ref }}
+ linux-build-old-
+ path: |
+ SDL2-2.30.3
+ tinyxml2-10.0.0
+ libzip-1.10.1
+ - name: Install latest SDL
+ run: |
+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
+ if [ ! -d "SDL2-2.30.3" ]; then
+ wget https://www.libsdl.org/release/SDL2-2.30.3.tar.gz
+ tar -xzf SDL2-2.30.3.tar.gz
+ fi
+ cd SDL2-2.30.3
+ ./configure --enable-hidapi-libusb
+ make -j 10
+ sudo make install
+ sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/
+ - name: Install latest SDL_net
+ run: |
+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
+ if [ ! -d "SDL2_net-2.2.0" ]; then
+ wget https://www.libsdl.org/projects/SDL_net/release/SDL2_net-2.2.0.tar.gz
+ tar -xzf SDL2_net-2.2.0.tar.gz
+ fi
+ cd SDL2_net-2.2.0
+ ./configure
+ make -j 10
+ sudo make install
+ sudo cp -av /usr/local/lib/libSDL* /lib/x86_64-linux-gnu/
+ - name: Install latest tinyxml2
+ run: |
+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
+ wget https://github.com/leethomason/tinyxml2/archive/refs/tags/10.0.0.tar.gz
+ tar -xzf 10.0.0.tar.gz
+ cd tinyxml2-10.0.0
+ mkdir -p build
+ cd build
+ cmake ..
+ make
+ sudo make install
+ - name: Install libzip without crypto
+ run: |
+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
+ if [ ! -d "libzip-1.10.1" ]; then
+ wget https://github.com/nih-at/libzip/releases/download/v1.10.1/libzip-1.10.1.tar.gz
+ tar -xzf libzip-1.10.1.tar.gz
+ fi
+ cd libzip-1.10.1
+ mkdir -p build
+ cd build
+ cmake .. -DENABLE_COMMONCRYPTO=OFF -DENABLE_GNUTLS=OFF -DENABLE_MBEDTLS=OFF -DENABLE_OPENSSL=OFF
+ make
+ sudo make install
+ sudo cp -av /usr/local/lib/libzip* /lib/x86_64-linux-gnu/
+ - name: Download spaghetti.o2r
+ uses: actions/download-artifact@v4
+ with:
+ name: spaghetti.o2r
+ path: ./build-cmake
+ - name: Build
+ run: |
+ cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release
+ cmake --build build-cmake --config Release -j3
+ (cd build-cmake && cpack -G External)
+ wget -O gamecontrollerdb.txt https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt
+ mv README.md readme.txt
+ mv build-cmake/*.appimage spaghetti.appimage
+ - name: Upload build
+ uses: actions/upload-artifact@v4
+ with:
+ name: Spaghettify-linux
+ path: |
+ spaghetti.appimage
+ config.yml
+ yamls
+ gamecontrollerdb.txt
+ build-linux-docker:
+ needs: generate-port-o2r
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ fetch-tags: true
+ submodules: recursive
+ - name: Docker caching
+ uses: ScribeMD/docker-cache@0.5.0
+ id: cache
+ continue-on-error: true
+ with:
+ key: sk-docker-cache-${{ hashFiles('Dockerfile') }}
+ - name: Build docker image
+ if: steps.cache.outputs.cache-hit != 'true'
+ run: docker build . -t spaghetti
+ - name: Confiure
+ run: docker run --rm -v ${PWD}:/project spaghetti cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release
+ - name: Build spaghetti
+ run: docker run --rm -v ${PWD}:/project spaghetti cmake --build build-cmake --config Release -j$(nproc)
+
build-switch:
needs: generate-port-o2r
runs-on: ubuntu-latest