diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98b65d5..7e01504 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -75,8 +75,7 @@ jobs: build-linux: name: Build Linux - runs-on: ubuntu-latest - container: ubuntu:noble + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: @@ -84,17 +83,9 @@ jobs: - debug - release arch: + - x86 - x64 steps: - - name: Install g++ and multilib - run: | - apt-get update - apt-get install -y wget tar git make gcc-13 g++-13 gcc-13-multilib g++-13-multilib - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 13 - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 13 - update-alternatives --set gcc /usr/bin/gcc-13 - update-alternatives --set g++ /usr/bin/g++-13 - - name: Check out files uses: actions/checkout@main with: @@ -103,6 +94,13 @@ jobs: # NOTE - If LFS ever starts getting used during builds, switch this to true! lfs: false + - name: Install dependencies (x86) + if: matrix.arch == 'x86' + run: | + sudo dpkg --add-architecture i386 + sudo apt-get update + sudo apt-get install gcc-multilib g++-multilib -y + - name: Install Premake5 uses: diamante0018/setup-premake@master with: @@ -121,7 +119,8 @@ jobs: - name: Build ${{matrix.arch}} ${{matrix.configuration}} binaries working-directory: ${{ github.workspace }} run: | - make -C build config=${{matrix.configuration}}_${{matrix.arch}} -j$(nproc) + pushd build + make config=${{matrix.configuration}}_${{matrix.arch}} -j$(nproc) - name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries uses: actions/upload-artifact@main @@ -231,7 +230,7 @@ jobs: shell: bash - name: Setup Docker Buildx - uses: docker/setup-buildx-action@v3.6.1 + uses: docker/setup-buildx-action@v3.8.0 - name: Login to DockerHub uses: docker/login-action@v3.3.0 @@ -240,7 +239,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - id: meta - uses: docker/metadata-action@v5.5.1 + uses: docker/metadata-action@v5.6.1 with: images: | alterware/master-server @@ -250,7 +249,7 @@ jobs: - name: Build and Push Docker Image id: build-and-push - uses: docker/build-push-action@v6.7.0 + uses: docker/build-push-action@v6.13.0 with: context: . platforms: linux/amd64 diff --git a/src/main.cpp b/src/main.cpp index cbc5c31..784f35e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -39,7 +39,7 @@ int main(const int argc, const char** argv) } catch (std::exception& e) { - console::error("Fatal error: %s\n", e.what()); + console::error("Fatal error: %s", e.what()); return -1; } diff --git a/src/services/statistics_handler.cpp b/src/services/statistics_handler.cpp index 1ad5425..01bbab6 100644 --- a/src/services/statistics_handler.cpp +++ b/src/services/statistics_handler.cpp @@ -41,10 +41,12 @@ namespace const auto location = utils::env::get_value("AW_STATS_LOCATION"); if (location.empty()) { - console::error("The environment variable 'AW_STATS_LOCATION' is not set. Please set 'AW_STATS_LOCATION' to specify the save location for 'stats.json'\n"); + console::error("The environment variable 'AW_STATS_LOCATION' is not set. Please set 'AW_STATS_LOCATION' to specify the save location for 'stats.json'"); return; } + console::info("Writing stats to %s", location.c_str()); + utils::io::write_file(location, root_data); } }