From 36e4eb3cb20fcb214f7356447c1252a252c7e6a2 Mon Sep 17 00:00:00 2001 From: Manu Garg Date: Sun, 21 Jul 2024 14:04:12 -0700 Subject: [PATCH 1/6] [build] Improve release binaries - Include architecture in the zip file name - Build binaries for MacOS ARM64 too. - Upload an artifact containing all release binaries. --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 102962b..5e94522 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,16 @@ jobs: build: strategy: matrix: - os: [ubuntu-latest, windows-latest, macos-13] + os: [ubuntu-latest, windows-latest, macos-13, macos-latest] + include: + - os: ubuntu-latest + os_suffix: "ubuntu-x86_64" + - os: macos-latest + architecture: "macos-arm64" + - os: macos-13 + architecture: "macos-x86_64" + - os: windows-latest + os_suffix: "windows-x86_64" runs-on: ${{ matrix.os }} steps: @@ -64,7 +73,7 @@ jobs: - name: make non-windows dist if: ${{ matrix.os != 'windows-latest' }} run: | - DIST_OS_SUFFIX=${{ matrix.os }} make -C src dist + DIST_OS_SUFFIX=${{ matrix.os_suffix }} make -C src dist ls -R src/*.zip - name: make windows dist @@ -86,6 +95,21 @@ jobs: name: pacparser-dist-${{ matrix.os }} path: src/dist + build-release-binaries: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download ubuntu cloudprober binaries + uses: actions/download-artifact@v4 + with: + pattern: pacparser-*-latest-dist + + - name: Upload pacparser release + uses: actions/upload-artifact@v2 + with: + name: pacparser-release-binaries + path: pacparser-*.zip + python-module-build: strategy: matrix: From cccb7fd56b38ccc92f0c999ff554eacadb16ddd1 Mon Sep 17 00:00:00 2001 From: Manu Garg Date: Sun, 21 Jul 2024 14:15:11 -0700 Subject: [PATCH 2/6] Fix asset name in release binaries step --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e94522..cda7cef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -102,7 +102,7 @@ jobs: - name: Download ubuntu cloudprober binaries uses: actions/download-artifact@v4 with: - pattern: pacparser-*-latest-dist + pattern: pacparser-dist-* - name: Upload pacparser release uses: actions/upload-artifact@v2 From c0080600f8db5dc2cf8d3588c074c20d92c5922c Mon Sep 17 00:00:00 2001 From: Manu Garg Date: Sun, 21 Jul 2024 14:19:09 -0700 Subject: [PATCH 3/6] List downloaded files --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cda7cef..7f395c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,7 +103,7 @@ jobs: uses: actions/download-artifact@v4 with: pattern: pacparser-dist-* - + - run: ls -R . - name: Upload pacparser release uses: actions/upload-artifact@v2 with: From f47c5e0af8f767725a0d701231496adaea9397b3 Mon Sep 17 00:00:00 2001 From: Manu Garg Date: Sun, 21 Jul 2024 14:29:35 -0700 Subject: [PATCH 4/6] Experiment --- .github/workflows/build.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f395c2..6448cc6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,9 +30,9 @@ jobs: - os: ubuntu-latest os_suffix: "ubuntu-x86_64" - os: macos-latest - architecture: "macos-arm64" + os_suffix: "macos-arm64" - os: macos-13 - architecture: "macos-x86_64" + os_suffix: "macos-x86_64" - os: windows-latest os_suffix: "windows-x86_64" runs-on: ${{ matrix.os }} @@ -103,7 +103,15 @@ jobs: uses: actions/download-artifact@v4 with: pattern: pacparser-dist-* - - run: ls -R . + + - run: | + ls -R . + mv pacparser-dist-*/*.zip . + file=$(ls pacparser-*-ubuntu*.zip) + echo ${file/ubuntu/windows} + name=${file/ubuntu/windows} + echo $name + - name: Upload pacparser release uses: actions/upload-artifact@v2 with: From c862c3b9c62f03c2c52e4c4b10280f7ce8bcf9b8 Mon Sep 17 00:00:00 2001 From: Manu Garg Date: Sun, 21 Jul 2024 14:32:46 -0700 Subject: [PATCH 5/6] fix windows release name --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6448cc6..e89cc2b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -108,9 +108,9 @@ jobs: ls -R . mv pacparser-dist-*/*.zip . file=$(ls pacparser-*-ubuntu*.zip) - echo ${file/ubuntu/windows} name=${file/ubuntu/windows} - echo $name + mv pacparser-dist-windows-latest $name + zip -r $name.zip $name - name: Upload pacparser release uses: actions/upload-artifact@v2 From ad4b91c48a915d4818c572135202ce0a05a7826a Mon Sep 17 00:00:00 2001 From: Manu Garg Date: Sun, 21 Jul 2024 14:39:24 -0700 Subject: [PATCH 6/6] fix windows release name --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e89cc2b..4d08346 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -104,11 +104,13 @@ jobs: with: pattern: pacparser-dist-* - - run: | + - name: Fix files + run: | ls -R . mv pacparser-dist-*/*.zip . file=$(ls pacparser-*-ubuntu*.zip) name=${file/ubuntu/windows} + name=${name/.zip/} mv pacparser-dist-windows-latest $name zip -r $name.zip $name