summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2025-02-07 23:48:36 -0700
committerGitHub <noreply@github.com>2025-02-07 23:48:36 -0700
commitbb90ff8531b20279bcb62438e3ed9d49d65bfaa4 (patch)
tree424481110c16140362a797bc31301409ee118ebd /.github
parent008d527ed5bae64e18eff59310bd18d698d4c016 (diff)
Fix Compile (#188)
* Fix freecam rotation smoothing * Configure freecam controller * Fix cont z button and impl freecam on/off events * Add torch static comp * Fixed cmake * Copied yamls * Fixed cmake * Added github workflows * Update CMakeLists.txt --------- Co-authored-by: KiritoDv <kiritodev01@gmail.com>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/linux-compile.yml58
-rw-r--r--.github/workflows/macos-compile.yml41
-rw-r--r--.github/workflows/main.yml195
-rw-r--r--.github/workflows/windows-compile.yml33
4 files changed, 265 insertions, 62 deletions
diff --git a/.github/workflows/linux-compile.yml b/.github/workflows/linux-compile.yml
index b4c0b35b0..d29dc83a5 100644
--- a/.github/workflows/linux-compile.yml
+++ b/.github/workflows/linux-compile.yml
@@ -1,31 +1,51 @@
-name: Linux Compile test
+name: Linux Validation
on:
- push:
- branches: [ "*" ]
- pull_request:
- branches: [ "master" ]
+ pull_request:
+ branches: [ "*" ]
jobs:
build:
- if: 0
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4.1.1
+ - uses: actions/checkout@v4
with:
- submodules: "true"
- - name: Get Complementary file
- uses: actions/checkout@v4.1.1
- with:
- path: complementary_file
- repository: UnspaghettifyKart/action-build-private-file
- ssh-key: ${{ secrets.LINUX_SSH_PRIVATE_KEY }}
+ 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 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: Install latest SDL
+ run: |
+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
+ wget https://www.libsdl.org/release/SDL2-2.24.1.tar.gz
+ tar -xzf SDL2-2.24.1.tar.gz
+ cd SDL2-2.24.1
+ ./configure
+ make -j 10
+ sudo make install
+ - name: Install latest tinyxml2
run: |
- sudo apt install build-essential cmake pkg-config git binutils-mips-linux-gnu python3 zlib1g-dev libaudiofile-dev libcapstone-dev
+ 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: Build
run: |
- cp -r complementary_file/* .
- echo "${{ secrets.AES_KEY }}" | openssl enc -d -aes-256-cbc -pass stdin -pbkdf2 -in baserom.us.z64.aes -out baserom.us.z64
- make assets
- make -j || ./first-diff.py \ No newline at end of file
+ cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release
+ cmake --build build-cmake -j
+ - name: Create Package
+ run: |
+ mkdir spaghetti-release
+ mv build-cmake/spaghetti spaghetti-release/
+ - name: Publish packaged artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: spaghetti-linux-x64
+ path: spaghetti-release
+ retention-days: 1
diff --git a/.github/workflows/macos-compile.yml b/.github/workflows/macos-compile.yml
index 23fa71db7..18c7415bf 100644
--- a/.github/workflows/macos-compile.yml
+++ b/.github/workflows/macos-compile.yml
@@ -1,32 +1,29 @@
-name: Macos Compile test
+name: MacOS Validation
on:
- push:
- branches: [ "*" ]
- pull_request:
- branches: [ "master" ]
+ pull_request:
+ branches: [ "*" ]
jobs:
build:
- if: 0
- runs-on: macos-latest
+ runs-on: macOS-latest
steps:
- - uses: actions/checkout@v4.1.1
+ - uses: actions/checkout@v4
with:
- submodules: "true"
- - name: Get Complementary file
- uses: actions/checkout@v4.1.1
- with:
- path: complementary_file
- repository: UnspaghettifyKart/action-build-private-file
- ssh-key: ${{ secrets.MACOS_SSH_PRIVATE_KEY }}
+ submodules: recursive
- name: Install dependencies
- run: |
- brew update
- brew install python3 capstone coreutils make pkg-config tehzz/n64-dev/mips64-elf-binutils cmake
+ run: brew install sdl2 libpng glew ninja cmake libzip nlohmann-json tinyxml2 spdlog vorbis-tools
- name: Build
run: |
- cp -r complementary_file/* .
- echo "${{ secrets.AES_KEY }}" | openssl enc -d -aes-256-cbc -pass stdin -pbkdf2 -in baserom.us.z64.aes -out baserom.us.z64
- make assets
- make -j \ No newline at end of file
+ cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release
+ cmake --build build-cmake -j
+ - name: Create Package
+ run: |
+ mkdir spaghetti-release
+ mv build-cmake/spaghetti spaghetti-release/
+ - name: Publish packaged artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: spaghetti-mac-x64
+ path: spaghetti-release
+ retention-days: 1 \ No newline at end of file
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 000000000..965b2d34c
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,195 @@
+name: GenerateBuilds
+
+on:
+ push:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ generate-port-o2r:
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: true
+ - name: Install dependencies
+ run: sudo apt-get install gcc g++ git cmake ninja-build lsb-release
+ - name: ccache
+ uses: hendrikmuhs/ccache-action@v1.2.13
+ with:
+ key: ${{ runner.os }}-o2r-ccache-${{ github.ref }}-${{ github.sha }}
+ restore-keys: |
+ ${{ runner.os }}-o2r-ccache-${{ github.ref }}
+ ${{ runner.os }}-o2r-ccache-
+ - name: Cache build folders
+ uses: actions/cache@v4
+ with:
+ key: ${{ runner.os }}-o2r-build-${{ github.ref }}-${{ github.sha }}
+ restore-keys: |
+ ${{ runner.os }}-o2r-build-${{ github.ref }}
+ ${{ runner.os }}-o2r-build-
+ path: |
+ torch/cmake-build-release
+ - name: Generate spaghetti.o2r
+ run: |
+ export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
+ make -C torch type=release -j3
+ torch/cmake-build-release/torch pack port spaghetti.o2r o2r
+ - uses: actions/upload-artifact@v4
+ with:
+ name: spaghetti.o2r
+ path: spaghetti.o2r
+ retention-days: 1
+
+ build-windows:
+ needs: generate-port-o2r
+ runs-on: windows-2022
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ 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/Spaghetti.exe spaghetti-release/
+ mv build/x64/Release/spaghetti.o2r spaghetti-release/
+ mv config.yml spaghetti-release/
+ mv assets 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:
+ submodules: recursive
+ - name: Install dependencies
+ run: brew install sdl2 libpng glew ninja cmake libzip nlohmann-json tinyxml2 spdlog vorbis-tools
+ - name: Build
+ run: |
+ cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release
+ 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/Spaghetti spaghetti-release/
+ mv build-cmake/spaghetti.o2r spaghetti-release/
+ mv config.yml spaghetti-release/
+ mv assets spaghetti-release/
+ wget -O spaghetti-release/gamecontrollerdb.txt https://github.com/mdqinc/SDL_GameControllerDB/blob/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:
+ 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 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://github.com/mdqinc/SDL_GameControllerDB/blob/master/gamecontrollerdb.txt
+ mv README.md readme.txt
+ mv build-cmake/*.appimage spaghetti.appimage
+ - name: Upload build
+ uses: actions/upload-artifact@v4
+ with:
+ name: Spaghetti-linux
+ path: |
+ spaghetti.appimage
+ config.yml
+ assets
+ gamecontrollerdb.txt
diff --git a/.github/workflows/windows-compile.yml b/.github/workflows/windows-compile.yml
index 28f3c4890..56ce1d294 100644
--- a/.github/workflows/windows-compile.yml
+++ b/.github/workflows/windows-compile.yml
@@ -1,32 +1,23 @@
-name: Windows Compile test
+name: Windows Validation
on:
- push:
- branches: [ "*" ]
pull_request:
- branches: [ "master" ]
+ branches: [ "*" ]
jobs:
build:
- if: 0
runs-on: windows-2022
steps:
- - uses: actions/checkout@v4.1.1
- with:
- submodules: "true"
- - name: Get Complementary file
- uses: actions/checkout@v4.1.1
+ - uses: actions/checkout@v4
with:
- path: complementary_file
- repository: UnspaghettifyKart/action-build-private-file
- ssh-key: ${{ secrets.WINDOWS_SSH_PRIVATE_KEY }}
- - name: Install dependencies
- run: |
- Invoke-WebRequest https://github.com/coco875/mk64-tools/releases/download/v0.0.8/mips-tools-chain-windows.zip -OutFile mips-tools-chain-windows.zip
- Expand-Archive mips-tools-chain-windows.zip -DestinationPath mips-tools-chain-windows
- Copy-Item -Path mips-tools-chain-windows/mingw64 -Destination tools -Recurse
+ submodules: recursive
- name: Build
run: |
- Copy-Item -Path complementary_file/* -Destination . -Recurse
- echo "${{ secrets.AES_KEY }}" | openssl enc -d -aes-256-cbc -pass stdin -pbkdf2 -in baserom.us.z64.aes -out baserom.us.z64
- python tools/windows_build.py \ No newline at end of file
+ cmake -S . -B "build/x64" -G "Visual Studio 17 2022" -T v143 -A x64 -DCMAKE_BUILD_TYPE=Release
+ cmake --build ./build/x64
+ - name: Upload build
+ uses: actions/upload-artifact@v4
+ with:
+ name: spaghetti-windows
+ path: ./build/x64/Debug
+ retention-days: 1 \ No newline at end of file