diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ed993be..84c3c9a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,7 @@ on: jobs: build: runs-on: ubuntu-latest + container: archlinux:latest steps: - uses: actions/checkout@v4 with: @@ -22,6 +23,7 @@ jobs: if: ${{ github.event_name == 'push' }} shell: bash run: | + git config --global --add safe.directory $GITHUB_WORKSPACE git fetch --tags --force if LAST_TAG=$(git describe --tags --abbrev=0 2>/dev/null); then @@ -48,13 +50,6 @@ jobs: echo "EOF" } >> $GITHUB_OUTPUT - - name: Cache CMake Binary - id: cmake-cache - uses: actions/cache@v4 - with: - path: cmake-4.3.4-linux-x86_64 - key: ${{ runner.os }}-cmake-4.3.4 - - name: Cache FetchContent & ccache uses: actions/cache@v4 with: @@ -68,23 +63,14 @@ jobs: - name: Install tools run: | - sudo apt-get update - sudo apt-get install -y mingw-w64 zstd ccache zip + pacman -Syu --noconfirm + pacman -S --noconfirm mingw-w64-gcc cmake ninja ccache zip git base-devel mkdir -p ccache echo "CCACHE_DIR=$GITHUB_WORKSPACE/ccache" >> $GITHUB_ENV - - name: Install CMake 4.3.4 - if: steps.tools-cache.outputs.cache-hit != 'true' - run: | - wget -q https://github.com/Kitware/CMake/releases/download/v4.3.4/cmake-4.3.4-linux-x86_64.tar.gz - tar xzf cmake-4.3.4-linux-x86_64.tar.gz - - - name: Add CMake to path - run: echo "$GITHUB_WORKSPACE/cmake-4.3.4-linux-x86_64/bin" >> $GITHUB_PATH - - name: Configure CMake run: | - cmake -B build -S . \ + cmake -B build -S . -G Ninja \ -DCMAKE_SYSTEM_NAME=Windows \ -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \ -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \ diff --git a/CMakeLists.txt b/CMakeLists.txt index e67104f..037cf25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ if(MSVC) add_compile_definitions(_AMD64_) endif() else() - add_compile_options(-m64 -fabi-version=0 -frtti) + add_compile_options(-m64) endif() project(hex-unlocked LANGUAGES CXX) @@ -147,7 +147,7 @@ set_target_properties(hex-unlocked PROPERTIES OUTPUT_NAME "${RANDOM_EXE_NAME}") # compiler / IDE config if(NOT MSVC) - target_link_options(hex-unlocked PRIVATE -static -static-libgcc -static-libstdc++ "-Wl,--allow-multiple-definition") + target_link_options(hex-unlocked PRIVATE -static -static-libgcc -static-libstdc++) else() set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT hex-unlocked) endif()