From f434cd225ec2dfa7cab83a4b2373fdab50e8ca5b Mon Sep 17 00:00:00 2001 From: SirLynix Date: Sun, 10 Nov 2024 18:22:03 +0100 Subject: [PATCH 1/7] Update build.yaml --- .github/workflows/build.yaml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8fbdc028..2fd54397 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,8 +19,8 @@ jobs: platform: - { runner: windows-latest, os: windows, arch: x64, archive_ext: .zip } - { runner: ubuntu-latest, os: linux, arch: x86_64, archive_ext: .tar.gz } - - { runner: macos-12, os: macos, arch: x86_64, archive_ext: .tar.gz } - - { runner: macos-14, os: macos, arch: arm64, archive_ext: .tar.gz } + - { runner: macos-latest, os: macos, arch: x86_64, archive_ext: .tar.gz } + - { runner: macos-latest, os: macos, arch: arm64, archive_ext: .tar.gz } mode: [debug, releasedbg] runs-on: ${{ matrix.platform.runner }} @@ -96,12 +96,6 @@ jobs: rm -rf dest/lib/ shell: bash - # For some reason macOS-14 doesn't seem to have Python - - uses: actions/setup-python@v5 - if: ${{ matrix.platform.runner == 'macos-14' }} - with: - python-version: "3.11" - - name: Archive result uses: ihiroky/archive-action@v1 with: From 42c7a1115eab6e4b7abe255fb241f8e6d7f0b9e8 Mon Sep 17 00:00:00 2001 From: SirLynix Date: Sun, 10 Nov 2024 22:07:12 +0100 Subject: [PATCH 2/7] Update build.yaml --- .github/workflows/build.yaml | 47 ++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2fd54397..712dbd09 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -31,8 +31,10 @@ jobs: run: echo "key=$(date +'%W')" >> $GITHUB_OUTPUT shell: bash - - name: "Set OUTPUT_FILE variable" - run: echo "OUTPUT_FILE=${{ matrix.platform.os }}_${{ matrix.platform.arch }}_${{ matrix.mode }}${{ matrix.platform.archive_ext }}" >> $GITHUB_ENV + - name: "Set output variables" + run: + echo "OUTPUT_NAME=${{ matrix.platform.os }}_${{ matrix.platform.arch }}_${{ matrix.mode }}" >> $GITHUB_ENV + echo "OUTPUT_FILE=${{ env.OUTPUT_NAME }}${{ matrix.platform.archive_ext }}" >> $GITHUB_ENV shell: bash # Force xmake to a specific folder (for cache) @@ -86,20 +88,29 @@ jobs: - name: Install run: | - xmake install -vo dest/ + xmake install -vo output/ if [ "$RUNNER_OS" == "Linux" ]; then - mv ./dest/lib/*.so* ./dest/bin/ + mv ./output/lib/*.so* ./output/bin/ elif [ "$RUNNER_OS" == "macOS" ]; then - mv ./dest/lib/*.dylib* ./dest/bin/ + mv ./output/lib/*.dylib* ./output/bin/ fi - rm -rf dest/include/ - rm -rf dest/lib/ + rm -rf output/include/ + rm -rf output/lib/ + mv output/bin ${{ env.OUTPUT_NAME }} shell: bash + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: artifact-${{ env.OUTPUT_NAME }} + path: ${{ env.OUTPUT_NAME }} + if-no-files-found: error + retention-days: 1 + - name: Archive result uses: ihiroky/archive-action@v1 with: - root_dir: dest/bin + root_dir: ${{ env.OUTPUT_NAME }} file_path: ${{ env.OUTPUT_FILE }} verbose: true @@ -154,3 +165,23 @@ jobs: asset_name: ${{ env.OUTPUT_FILE }}.sha256 tag: ${{ github.ref }} overwrite: true + + build-universal: + strategy: + fail-fast: false + matrix: + os: [macOS] + mode: [debug, releasedbg] + + runs-on: macos-latest + needs: build + steps: + - name: Download x86_64 binaries + uses: actions/download-artifact@v4 + with: + pattern: artifact-${{ matrix.os }}-*-${{ matrix.mode }} + path: output + run-id: build + merge-multiple: true + + - run: ls -R output From 645357e915495685ccbad1faa79408330765f415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Sun, 10 Nov 2024 22:10:46 +0100 Subject: [PATCH 3/7] Update build.yaml --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 712dbd09..28ee93df 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,7 +32,7 @@ jobs: shell: bash - name: "Set output variables" - run: + run: | echo "OUTPUT_NAME=${{ matrix.platform.os }}_${{ matrix.platform.arch }}_${{ matrix.mode }}" >> $GITHUB_ENV echo "OUTPUT_FILE=${{ env.OUTPUT_NAME }}${{ matrix.platform.archive_ext }}" >> $GITHUB_ENV shell: bash From 1dda98d3e9ad16904b14ce60bbff63bc42af3131 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Sun, 10 Nov 2024 22:24:41 +0100 Subject: [PATCH 4/7] Update build.yaml --- .github/workflows/build.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 28ee93df..c575b35c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -33,8 +33,9 @@ jobs: - name: "Set output variables" run: | - echo "OUTPUT_NAME=${{ matrix.platform.os }}_${{ matrix.platform.arch }}_${{ matrix.mode }}" >> $GITHUB_ENV - echo "OUTPUT_FILE=${{ env.OUTPUT_NAME }}${{ matrix.platform.archive_ext }}" >> $GITHUB_ENV + OUTPUT_NAME=${{ matrix.platform.os }}_${{ matrix.platform.arch }}_${{ matrix.mode }} + echo "OUTPUT_NAME=$OUTPUT_NAME" >> $GITHUB_ENV + echo "OUTPUT_FILE=$OUTPUT_NAME${{ matrix.platform.archive_ext }}" >> $GITHUB_ENV shell: bash # Force xmake to a specific folder (for cache) From 15e567da30761a8e8120e94a4657057eddaeb53b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Sun, 10 Nov 2024 22:38:42 +0100 Subject: [PATCH 5/7] Update build.yaml --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c575b35c..04bfb2ca 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -180,7 +180,7 @@ jobs: - name: Download x86_64 binaries uses: actions/download-artifact@v4 with: - pattern: artifact-${{ matrix.os }}-*-${{ matrix.mode }} + pattern: artifact-${{ matrix.os }}_*_${{ matrix.mode }} path: output run-id: build merge-multiple: true From a7c506a4a7d2203830a9fc4b85eedff21a42156e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Sun, 10 Nov 2024 22:49:02 +0100 Subject: [PATCH 6/7] Update build.yaml --- .github/workflows/build.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 04bfb2ca..085aa8db 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -177,12 +177,11 @@ jobs: runs-on: macos-latest needs: build steps: - - name: Download x86_64 binaries + - name: Download binaries uses: actions/download-artifact@v4 with: pattern: artifact-${{ matrix.os }}_*_${{ matrix.mode }} path: output - run-id: build merge-multiple: true - run: ls -R output From 1d508f50f8a4992c59201d9d2333d045d6864d77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Fri, 15 Nov 2024 14:22:13 +0100 Subject: [PATCH 7/7] Update build.yaml --- .github/workflows/build.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 085aa8db..272017b4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -167,21 +167,25 @@ jobs: tag: ${{ github.ref }} overwrite: true - build-universal: + build-macos-universal: strategy: fail-fast: false matrix: - os: [macOS] mode: [debug, releasedbg] runs-on: macos-latest needs: build steps: - - name: Download binaries + - name: Download x86_64 binaries uses: actions/download-artifact@v4 with: - pattern: artifact-${{ matrix.os }}_*_${{ matrix.mode }} - path: output - merge-multiple: true + name: artifact-macOS_x86_64_${{ matrix.mode }} + path: output/x86_64 + + - name: Download arm64 binaries + uses: actions/download-artifact@v4 + with: + name: artifact-macOS_arm64_${{ matrix.mode }} + path: output/arm64 - run: ls -R output