From 20fde996954a0f340779f63811609a72dd4323ba Mon Sep 17 00:00:00 2001 From: alifeee Date: Mon, 8 Jan 2024 17:08:36 +0000 Subject: [PATCH 1/6] add mac OS build to CI --- .github/workflows/cmake-multi-platform.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index eb0b497..12c30f7 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest, windows-latest, macos-latest] build_type: [Release] c_compiler: [gcc, cl] include: @@ -21,11 +21,15 @@ jobs: c_compiler: cl - os: ubuntu-latest c_compiler: gcc + - os: macos-latest + c_compiler: gcc exclude: - os: windows-latest c_compiler: gcc - os: ubuntu-latest c_compiler: cl + - os: macos-latest + c_compiler: cl steps: - uses: actions/checkout@v3 From 8281a1b3d6bec6a8be8a03ff2e903923ff7ace8e Mon Sep 17 00:00:00 2001 From: alifeee Date: Mon, 8 Jan 2024 17:11:27 +0000 Subject: [PATCH 2/6] add macos build to release.yml --- .github/workflows/release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9402d85..711cdec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest, windows-latest, macos-latest] build_type: [Release] c_compiler: [gcc, cl] include: @@ -37,11 +37,15 @@ jobs: c_compiler: cl - os: ubuntu-latest c_compiler: gcc + - os: macos-latest + c_compiler: gcc exclude: - os: windows-latest c_compiler: gcc - os: ubuntu-latest c_compiler: cl + - os: macos-latest + c_compiler: cl steps: - uses: actions/checkout@v3 From 04fac8a944a1cb9ec6870916c62f9992ac6b6875 Mon Sep 17 00:00:00 2001 From: alifeee Date: Mon, 8 Jan 2024 17:15:07 +0000 Subject: [PATCH 3/6] rename Mac plugin and add to manifest --- .github/workflows/cmake-multi-platform.yml | 18 +++++++++++++----- mumble/manifest.xml | 1 + 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 12c30f7..e0e8dc7 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -13,19 +13,23 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [ + ubuntu-latest, + # windows-latest, + macos-latest, + ] build_type: [Release] c_compiler: [gcc, cl] include: - - os: windows-latest - c_compiler: cl + # - os: windows-latest + # c_compiler: cl - os: ubuntu-latest c_compiler: gcc - os: macos-latest c_compiler: gcc exclude: - - os: windows-latest - c_compiler: gcc + # - os: windows-latest + # c_compiler: gcc - os: ubuntu-latest c_compiler: cl - os: macos-latest @@ -51,6 +55,10 @@ jobs: - name: Build run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} + - name: Rename Mac OS X plugin + if: matrix.os == 'macos-latest' + run: mv ${{ steps.strings.outputs.build-output-dir }}/libplugin.so ${{ steps.strings.outputs.build-output-dir }}/libplugin_mac.so + - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 with: diff --git a/mumble/manifest.xml b/mumble/manifest.xml index 0a581c2..febe73c 100644 --- a/mumble/manifest.xml +++ b/mumble/manifest.xml @@ -3,6 +3,7 @@ plugin.dll libplugin.so + libplugin_mac.so Factorio Positional Audio 1.1.0 From 333cf9537790a99c80c75e2ecae7f50809141ffe Mon Sep 17 00:00:00 2001 From: alifeee Date: Mon, 8 Jan 2024 17:17:02 +0000 Subject: [PATCH 4/6] list files (to find mac file) --- .github/workflows/cmake-multi-platform.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index e0e8dc7..f6e6528 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -55,9 +55,12 @@ jobs: - name: Build run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} - - name: Rename Mac OS X plugin - if: matrix.os == 'macos-latest' - run: mv ${{ steps.strings.outputs.build-output-dir }}/libplugin.so ${{ steps.strings.outputs.build-output-dir }}/libplugin_mac.so + - name: List files + run: ls -R ${{ steps.strings.outputs.build-output-dir }} + + # - name: Rename Mac OS X plugin + # if: matrix.os == 'macos-latest' + # run: mv ${{ steps.strings.outputs.build-output-dir }}/libplugin.so ${{ steps.strings.outputs.build-output-dir }}/libplugin_mac.so - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 From 139e4eec4a8d7303284c2228722a3eae95724daf Mon Sep 17 00:00:00 2001 From: alifeee Date: Mon, 8 Jan 2024 17:20:04 +0000 Subject: [PATCH 5/6] make build script mac compatible copy mac built file into plugin --- .github/workflows/cmake-multi-platform.yml | 26 +++++++--------------- 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index f6e6528..7471246 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -13,23 +13,19 @@ jobs: strategy: fail-fast: true matrix: - os: [ - ubuntu-latest, - # windows-latest, - macos-latest, - ] + os: [ubuntu-latest, windows-latest, macos-latest] build_type: [Release] c_compiler: [gcc, cl] include: - # - os: windows-latest - # c_compiler: cl + - os: windows-latest + c_compiler: cl - os: ubuntu-latest c_compiler: gcc - os: macos-latest c_compiler: gcc exclude: - # - os: windows-latest - # c_compiler: gcc + - os: windows-latest + c_compiler: gcc - os: ubuntu-latest c_compiler: cl - os: macos-latest @@ -55,13 +51,6 @@ jobs: - name: Build run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} - - name: List files - run: ls -R ${{ steps.strings.outputs.build-output-dir }} - - # - name: Rename Mac OS X plugin - # if: matrix.os == 'macos-latest' - # run: mv ${{ steps.strings.outputs.build-output-dir }}/libplugin.so ${{ steps.strings.outputs.build-output-dir }}/libplugin_mac.so - - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 with: @@ -81,10 +70,11 @@ jobs: - name: Bundle run: | - mv build/libfactorio_linux_x86_64.so libplugin.so mv build/Release/plugin.dll plugin.dll + mv build/libfactorio_linux_x86_64.so libplugin.so + mv build/libfactorio_macos_x86_64.dylib libplugin.dylib mv mumble/manifest.xml manifest.xml - zip -MM factorio.mumble_plugin manifest.xml libplugin.so plugin.dll + zip -MM factorio.mumble_plugin manifest.xml plugin.dll libplugin.so libplugin.dylib - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3 From 1050a54d29c9baef0f69351f8bcd2464501c0b44 Mon Sep 17 00:00:00 2001 From: alifeee Date: Mon, 8 Jan 2024 17:29:08 +0000 Subject: [PATCH 6/6] add mac bundling to release workflow --- .github/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 711cdec..4e62a01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -86,10 +86,11 @@ jobs: - name: Bundle run: | - mv build/libfactorio_linux_x86_64.so libplugin.so mv build/Release/plugin.dll plugin.dll + mv build/libfactorio_linux_x86_64.so libplugin.so + mv build/libfactorio_macos_x86_64.dylib libplugin.dylib mv mumble/manifest.xml manifest.xml - zip -MM factorio.mumble_plugin manifest.xml libplugin.so plugin.dll + zip -MM factorio.mumble_plugin manifest.xml plugin.dll libplugin.so libplugin.dylib - name: Upload a Build Artifact uses: actions/upload-artifact@v3.1.3