Fix ci (#549)
* try fix ci * use fmt instead * try another fix for fmt * fix link and detect for c++ 20 * invert condition on format
This commit is contained in:
parent
f70c9100b0
commit
6f133d2045
|
|
@ -80,7 +80,7 @@ jobs:
|
||||||
name: spaghetti-windows
|
name: spaghetti-windows
|
||||||
path: spaghetti-${{ matrix.config }}
|
path: spaghetti-${{ matrix.config }}
|
||||||
|
|
||||||
build-macos:
|
build-macos-arm64:
|
||||||
needs: generate-port-o2r
|
needs: generate-port-o2r
|
||||||
runs-on: macOS-latest
|
runs-on: macOS-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
|
@ -119,7 +119,49 @@ jobs:
|
||||||
if: matrix.config == 'Release'
|
if: matrix.config == 'Release'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: spaghetti-mac-x64
|
name: spaghetti-mac-arm64
|
||||||
|
path: spaghetti-${{ matrix.config }}
|
||||||
|
|
||||||
|
build-macos-intel:
|
||||||
|
needs: generate-port-o2r
|
||||||
|
runs-on: macOS-13
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
config: [Release, Debug]
|
||||||
|
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=${{ matrix.config }} -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||||
|
cmake --build build-cmake --config ${{ matrix.config }} -j3
|
||||||
|
- name: Download spaghetti.o2r
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: spaghetti.o2r
|
||||||
|
path: ./build-cmake
|
||||||
|
- name: Create Package
|
||||||
|
run: |
|
||||||
|
mkdir spaghetti-${{ matrix.config }}
|
||||||
|
mv build-cmake/Spaghettify spaghetti-${{ matrix.config }}/
|
||||||
|
mv build-cmake/spaghetti.o2r spaghetti-${{ matrix.config }}/
|
||||||
|
mv config.yml spaghetti-${{ matrix.config }}/
|
||||||
|
mv yamls spaghetti-${{ matrix.config }}/
|
||||||
|
wget -O spaghetti-${{ matrix.config }}/gamecontrollerdb.txt https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt
|
||||||
|
- name: Publish packaged artifacts
|
||||||
|
if: matrix.config == 'Release'
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: spaghetti-mac-intel-x64
|
||||||
path: spaghetti-${{ matrix.config }}
|
path: spaghetti-${{ matrix.config }}
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ include(cmake/automate-vcpkg.cmake)
|
||||||
set(VCPKG_TRIPLET x64-windows-static)
|
set(VCPKG_TRIPLET x64-windows-static)
|
||||||
set(VCPKG_TARGET_TRIPLET x64-windows-static)
|
set(VCPKG_TARGET_TRIPLET x64-windows-static)
|
||||||
vcpkg_bootstrap()
|
vcpkg_bootstrap()
|
||||||
vcpkg_install_packages(zlib bzip2 libzip libpng sdl2 sdl2-net glew glfw3 nlohmann-json tinyxml2 spdlog libogg libvorbis)
|
vcpkg_install_packages()
|
||||||
|
|
||||||
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME})
|
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${PROJECT_NAME})
|
||||||
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,8 @@ If you want to playtest a continuous integration build, you can find them at the
|
||||||
|
|
||||||
* [Windows](https://nightly.link/HarbourMasters/SpaghettiKart/workflows/main/main/spaghetti-windows.zip?status=completed)
|
* [Windows](https://nightly.link/HarbourMasters/SpaghettiKart/workflows/main/main/spaghetti-windows.zip?status=completed)
|
||||||
* [Linux](https://nightly.link/HarbourMasters/SpaghettiKart/workflows/main/main/spaghetti-linux-x64.zip?status=completed)
|
* [Linux](https://nightly.link/HarbourMasters/SpaghettiKart/workflows/main/main/spaghetti-linux-x64.zip?status=completed)
|
||||||
* [macOS](https://nightly.link/HarbourMasters/SpaghettiKart/workflows/main/main/spaghetti-mac-x64.zip?status=completed)
|
* [macOS-arm64](https://nightly.link/HarbourMasters/SpaghettiKart/workflows/main/main/spaghetti-mac-arm64.zip?status=completed)
|
||||||
|
* [macOS-intel](https://nightly.link/HarbourMasters/SpaghettiKart/workflows/main/main/spaghetti-mac-intel-x64.zip?status=completed)
|
||||||
* [Switch](https://nightly.link/HarbourMasters/SpaghettiKart/workflows/main/main/Spaghettify-switch.zip?status=completed)
|
* [Switch](https://nightly.link/HarbourMasters/SpaghettiKart/workflows/main/main/Spaghettify-switch.zip?status=completed)
|
||||||
|
|
||||||
Maintainers: [MegaMech](https://www.github.com/MegaMech), [Coco](https://www.github.com/coco875), [Kirito](https://github.com/KiritoDv)
|
Maintainers: [MegaMech](https://www.github.com/MegaMech), [Coco](https://www.github.com/coco875), [Kirito](https://github.com/KiritoDv)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,12 @@
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#if __has_include(<fmt/format.h>)
|
||||||
|
#include <fmt/format.h>
|
||||||
|
#define fmt(...) fmt::format(__VA_ARGS__)
|
||||||
|
#else
|
||||||
#include <format>
|
#include <format>
|
||||||
|
#define fmt(...) std::format(__VA_ARGS__)
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include <libultraship/libultra.h>
|
#include <libultraship/libultra.h>
|
||||||
|
|
@ -17,7 +23,7 @@ typedef struct ControllerPak {
|
||||||
} ControllerPak;
|
} ControllerPak;
|
||||||
|
|
||||||
std::string Pfs_PakFile_GetPath(u8 file_no) {
|
std::string Pfs_PakFile_GetPath(u8 file_no) {
|
||||||
return Ship::Context::GetPathRelativeToAppDirectory(std::format("controllerPak_file_{}.sav", file_no));
|
return Ship::Context::GetPathRelativeToAppDirectory(fmt("controllerPak_file_{}.sav", file_no));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Pfs_PakHeader_GetPath() {
|
std::string Pfs_PakHeader_GetPath() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue