From 5b52ed9f5953140fff361bb23128086ccf1c18f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 11:02:00 +0000 Subject: [PATCH 01/19] Create make_release.yml --- .github/workflows/make_release.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/make_release.yml diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml new file mode 100644 index 0000000..18c9489 --- /dev/null +++ b/.github/workflows/make_release.yml @@ -0,0 +1,14 @@ +on: [push] + +jobs: + hello_world_job: + runs-on: ubuntu-latest + name: Build linux-x86_64 binary + steps: + - name: Download build script + id: dl-build-script + run: wget https://github.com/tmaklin/biobins/blob/master/linux/mSWEEP/build.sh + - name: Compile binary in Holy Build Box container + id: compile-in-container + uses: phusion/holy-build-box-64@3.0.2 + run: ./build.sh 2.0.0 From 6d2048aa3c88813f35b7b3b2816866d9ab1e9eec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 13:06:43 +0200 Subject: [PATCH 02/19] Update build CI --- .github/workflows/make_release.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index 18c9489..8f018ca 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -1,14 +1,15 @@ +name: Build linux-x86_64 binary on: [push] jobs: - hello_world_job: + build_linux-x86_64: runs-on: ubuntu-latest - name: Build linux-x86_64 binary + container: phusion/holy-build-box-64@3.0.2 steps: - name: Download build script id: dl-build-script run: wget https://github.com/tmaklin/biobins/blob/master/linux/mSWEEP/build.sh + - name: Compile binary in Holy Build Box container id: compile-in-container - uses: phusion/holy-build-box-64@3.0.2 run: ./build.sh 2.0.0 From 433e9680f2890a775b586b7b6140b120babd85dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 13:07:36 +0200 Subject: [PATCH 03/19] Fix release reference --- .github/workflows/make_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index 8f018ca..a3fea71 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -4,7 +4,7 @@ on: [push] jobs: build_linux-x86_64: runs-on: ubuntu-latest - container: phusion/holy-build-box-64@3.0.2 + container: phusion/holy-build-box-64:3.0.2 steps: - name: Download build script id: dl-build-script From 22f740e9a41a165339c40de4c27b8289bba44c64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 13:09:34 +0200 Subject: [PATCH 04/19] Add step to install wget --- .github/workflows/make_release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index a3fea71..3ace401 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -6,6 +6,10 @@ jobs: runs-on: ubuntu-latest container: phusion/holy-build-box-64:3.0.2 steps: + - name: Install wget + - id: install-wget + - run: apt install -y wget + - name: Download build script id: dl-build-script run: wget https://github.com/tmaklin/biobins/blob/master/linux/mSWEEP/build.sh From dcd185093d54c7b65e994ae540177ef0972e2545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 13:10:01 +0200 Subject: [PATCH 05/19] Fix formatting --- .github/workflows/make_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index 3ace401..2e814d3 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -7,8 +7,8 @@ jobs: container: phusion/holy-build-box-64:3.0.2 steps: - name: Install wget - - id: install-wget - - run: apt install -y wget + id: install-wget + run: apt install -y wget - name: Download build script id: dl-build-script From 45d9a9e2cf00dd9357cd1778643aff0542c748bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 13:11:27 +0200 Subject: [PATCH 06/19] apt->apt-get --- .github/workflows/make_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index 2e814d3..39ea45a 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Install wget id: install-wget - run: apt install -y wget + run: apt-get install -y wget - name: Download build script id: dl-build-script From 265d824b83d48d20ed6c7d0418a6fe7bb834192e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 13:14:01 +0200 Subject: [PATCH 07/19] Forgot container uses yum --- .github/workflows/make_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index 39ea45a..d80f67e 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -8,7 +8,7 @@ jobs: steps: - name: Install wget id: install-wget - run: apt-get install -y wget + run: yum install -y wget - name: Download build script id: dl-build-script From d8f2bd89c0c61d84a995f8023f9f2f62ae5d1921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 13:15:55 +0200 Subject: [PATCH 08/19] Set +x for downloaded script --- .github/workflows/make_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index d80f67e..df44ac6 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -16,4 +16,4 @@ jobs: - name: Compile binary in Holy Build Box container id: compile-in-container - run: ./build.sh 2.0.0 + run: chmod +x build.sh && ./build.sh 2.0.0 From 9dc295fe6e82e3cb4bae86d314d8b6c1d73526c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 13:17:51 +0200 Subject: [PATCH 09/19] Fix build.sh dl path --- .github/workflows/make_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index df44ac6..19c2e7c 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -12,7 +12,7 @@ jobs: - name: Download build script id: dl-build-script - run: wget https://github.com/tmaklin/biobins/blob/master/linux/mSWEEP/build.sh + run: wget https://raw.githubusercontent.com/tmaklin/biobins/master/linux/mSWEEP/build.sh - name: Compile binary in Holy Build Box container id: compile-in-container From 92a44f562296c80fcb4e1bc9761e2118305bc9ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 13:23:42 +0200 Subject: [PATCH 10/19] Create /io at root --- .github/workflows/make_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index 19c2e7c..abbebbd 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -16,4 +16,4 @@ jobs: - name: Compile binary in Holy Build Box container id: compile-in-container - run: chmod +x build.sh && ./build.sh 2.0.0 + run: chmod +x build.sh && mkdir /io && cd /io && ./build.sh 2.0.0 From a428cc18cafcfdcc2c0f0834ba08fb999d695cfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 13:26:05 +0200 Subject: [PATCH 11/19] Create /io before downloading build script --- .github/workflows/make_release.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index abbebbd..30bfb97 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -10,10 +10,14 @@ jobs: id: install-wget run: yum install -y wget + - name: Create io directory + id: mkdir-io + run: mkdir /io && cd /io + - name: Download build script id: dl-build-script run: wget https://raw.githubusercontent.com/tmaklin/biobins/master/linux/mSWEEP/build.sh - name: Compile binary in Holy Build Box container id: compile-in-container - run: chmod +x build.sh && mkdir /io && cd /io && ./build.sh 2.0.0 + run: chmod +x build.sh && ./build.sh 2.0.0 From 02da2ce7cb7a582dd5f65727b17b738c19fcfee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 13:35:07 +0200 Subject: [PATCH 12/19] Add macOS x86-64 and arm64 builds. --- .github/workflows/make_release.yml | 50 +++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index 30bfb97..9b14eb4 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -1,4 +1,4 @@ -name: Build linux-x86_64 binary +name: Build binaries on: [push] jobs: @@ -21,3 +21,51 @@ jobs: - name: Compile binary in Holy Build Box container id: compile-in-container run: chmod +x build.sh && ./build.sh 2.0.0 + + build_macOS-x86_64: + runs-on: ubuntu-latest + container: ghcr.io/shepherdjerred/macos-cross-compiler:latest + steps: + - name: Install wget + id: install-wget + run: yum install -y wget + + - name: Create io directory + id: mkdir-io + run: mkdir /io && cd /io + + - name: Download toolchain file + id: dl-toolchain-file + run: wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/x86-64-toolchain.cmake && cp x86-64-toolchain.cmake ../ + + - name: Download build script + id: dl-build-script + run: wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/mSWEEP/build.sh + + - name: Compile binary in Holy Build Box container + id: compile-in-container + run: chmod +x build.sh && ./build.sh 2.0.0 x86-64 + + build_macOS-arm64: + runs-on: ubuntu-latest + container: ghcr.io/shepherdjerred/macos-cross-compiler:latest + steps: + - name: Install wget + id: install-wget + run: yum install -y wget + + - name: Create io directory + id: mkdir-io + run: mkdir /io && cd /io + + - name: Download toolchain file + id: dl-toolchain-file + run: wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/arm64-toolchain.cmake && cp arm64-toolchain.cmake ../ + + - name: Download build script + id: dl-build-script + run: wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/mSWEEP/build.sh + + - name: Compile binary in Holy Build Box container + id: compile-in-container + run: chmod +x build.sh && ./build.sh 2.0.0 arm64 From 77c1b8afeff2bd2b908aea363dc9c4cbffcaaff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 13:38:04 +0200 Subject: [PATCH 13/19] macOS container uses apt --- .github/workflows/make_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index 9b14eb4..efe419f 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -28,7 +28,7 @@ jobs: steps: - name: Install wget id: install-wget - run: yum install -y wget + run: apt install -y wget - name: Create io directory id: mkdir-io @@ -52,7 +52,7 @@ jobs: steps: - name: Install wget id: install-wget - run: yum install -y wget + run: apt install -y wget - name: Create io directory id: mkdir-io From e7bca5c13d625f74bf7e48a588d51f4ed2ce2577 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 13:44:00 +0200 Subject: [PATCH 14/19] Try fixing the toolchain paths. --- .github/workflows/make_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index efe419f..e6d68f6 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -36,7 +36,7 @@ jobs: - name: Download toolchain file id: dl-toolchain-file - run: wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/x86-64-toolchain.cmake && cp x86-64-toolchain.cmake ../ + run: wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/x86-64-toolchain.cmake && cp x86-64-toolchain.cmake /io/x86-64-toolchain.cmake && cp x86-64-toolchain.cmake /x86-64-toolchain.cmake - name: Download build script id: dl-build-script @@ -60,7 +60,7 @@ jobs: - name: Download toolchain file id: dl-toolchain-file - run: wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/arm64-toolchain.cmake && cp arm64-toolchain.cmake ../ + run: wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/x86-64-toolchain.cmake && cp x86-64-toolchain.cmake /io/x86-64-toolchain.cmake && cp x86-64-toolchain.cmake /x86-64-toolchain.cmake - name: Download build script id: dl-build-script From 950a0cbb26307d1446384edb0e64ab1c33e740cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 13:47:07 +0200 Subject: [PATCH 15/19] Correct toolchain for arm64. --- .github/workflows/make_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index e6d68f6..ec97915 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -60,7 +60,7 @@ jobs: - name: Download toolchain file id: dl-toolchain-file - run: wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/x86-64-toolchain.cmake && cp x86-64-toolchain.cmake /io/x86-64-toolchain.cmake && cp x86-64-toolchain.cmake /x86-64-toolchain.cmake + run: wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/arm64-toolchain.cmake && cp arm64-toolchain.cmake /io/arm64-toolchain.cmake && cp arm64-toolchain.cmake /arm64-toolchain.cmake - name: Download build script id: dl-build-script From c56e0ce3f11455ce087437e8fbdeb9f73d4c4ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 14:19:41 +0200 Subject: [PATCH 16/19] Add upload to release page on version tag or tmaklin-patch-1 push. --- .github/workflows/make_release.yml | 36 +++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index ec97915..e56d21d 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -1,5 +1,10 @@ name: Build binaries -on: [push] +on: + push: + tags: + - "v*.*.*" + branches: + - tmaklin-patch-1 jobs: build_linux-x86_64: @@ -20,7 +25,14 @@ jobs: - name: Compile binary in Holy Build Box container id: compile-in-container - run: chmod +x build.sh && ./build.sh 2.0.0 + run: chmod +x build.sh && ./build.sh ${{ github.ref_name }} + + - name: Upload linux-x86_64 binary + if: success() + uses: actions/upload-artifact@v3 + with: + name: mSWEEP-${{ github.ref_name }}-x86_64-redhat-linux + path: /io/mSWEEP-${{ github.ref_name }}-x86_64-redhat-linux.tar.gz build_macOS-x86_64: runs-on: ubuntu-latest @@ -42,9 +54,16 @@ jobs: id: dl-build-script run: wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/mSWEEP/build.sh - - name: Compile binary in Holy Build Box container + - name: Compile binary in macOS Cross Compiler container id: compile-in-container - run: chmod +x build.sh && ./build.sh 2.0.0 x86-64 + run: chmod +x build.sh && ./build.sh ${{ github.ref_name }} + + - name: Upload macOS-x86_64 binary + if: success() + uses: actions/upload-artifact@v3 + with: + name: mSWEEP-${{ github.ref_name }}-x86_64-apple-darwin22 + path: /io/mSWEEP-${{ github.ref_name }}-x86_64-apple-darwin22.tar.gz build_macOS-arm64: runs-on: ubuntu-latest @@ -66,6 +85,13 @@ jobs: id: dl-build-script run: wget https://raw.githubusercontent.com/tmaklin/biobins/master/macOS/mSWEEP/build.sh - - name: Compile binary in Holy Build Box container + - name: Compile binary in macOS Cross Compiler container id: compile-in-container run: chmod +x build.sh && ./build.sh 2.0.0 arm64 + + - name: Upload macOS-arm64 binary + if: success() + uses: actions/upload-artifact@v3 + with: + name: mSWEEP-${{ github.ref_name }}-arm64-apple-darwin22 + path: /io/mSWEEP-${{ github.ref_name }}-arm64-apple-darwin22.tar.gz From d4236e93f13b48833971675891271b5e53ee626d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 14:32:09 +0200 Subject: [PATCH 17/19] Fix architectures in macOS builds. --- .github/workflows/make_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index e56d21d..62977b1 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -56,7 +56,7 @@ jobs: - name: Compile binary in macOS Cross Compiler container id: compile-in-container - run: chmod +x build.sh && ./build.sh ${{ github.ref_name }} + run: chmod +x build.sh && ./build.sh ${{ github.ref_name }} x86-64 - name: Upload macOS-x86_64 binary if: success() @@ -87,7 +87,7 @@ jobs: - name: Compile binary in macOS Cross Compiler container id: compile-in-container - run: chmod +x build.sh && ./build.sh 2.0.0 arm64 + run: chmod +x build.sh && ./build.sh ${{ github.ref_name }} arm64 - name: Upload macOS-arm64 binary if: success() From b295738e4d976b4d16bd7efa6af122c6da3c466c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 14:38:36 +0200 Subject: [PATCH 18/19] Add create-release step to publish binaries. --- .github/workflows/make_release.yml | 31 ++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index 62977b1..d9c3ee4 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -95,3 +95,34 @@ jobs: with: name: mSWEEP-${{ github.ref_name }}-arm64-apple-darwin22 path: /io/mSWEEP-${{ github.ref_name }}-arm64-apple-darwin22.tar.gz + + create-release: + runs-on: ubuntu-latest + + needs: [ build_linux-x86_64, build_macOS-x86_64, build_macOS-arm64 ] + + steps: + - uses: actions/checkout@v2 + + - uses: actions/download-artifact@v2 + with: + path: build + + - name: Organise files + shell: bash + run: | + cp build/mSWEEP-${{ github.ref_name }}-arm64-apple-darwin22/mSWEEP-${{ github.ref_name }}-arm64-apple-darwin22.tar.gz . + cp build/mSWEEP-${{ github.ref_name }}-x86_64-apple-darwin22/mSWEEP-${{ github.ref_name }}-x86_64-apple-darwin22.tar.gz . + cp build/mSWEEP-${{ github.ref_name }}-x86_64-redhat-linux/mSWEEP-${{ github.ref_name }}-x86_64-redhat-linux.tar.gz . + + - name: Create release + id: create_release + uses: softprops/action-gh-release@v1 + with: + name: Release ${{ github.ref_name }} + draft: true + prerelease: false + fail_on_unmatched_files: true + generate_release_notes: true + files: | + mSWEEP-*.tar.gz \ No newline at end of file From 82cedc3de0c616d4b25d261a038739beccebae7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Tue, 27 Feb 2024 14:44:29 +0200 Subject: [PATCH 19/19] Finish workflow. --- .github/workflows/make_release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/make_release.yml b/.github/workflows/make_release.yml index d9c3ee4..50f374b 100644 --- a/.github/workflows/make_release.yml +++ b/.github/workflows/make_release.yml @@ -4,7 +4,7 @@ on: tags: - "v*.*.*" branches: - - tmaklin-patch-1 + - msweep-release-testing jobs: build_linux-x86_64: @@ -120,7 +120,7 @@ jobs: uses: softprops/action-gh-release@v1 with: name: Release ${{ github.ref_name }} - draft: true + draft: false prerelease: false fail_on_unmatched_files: true generate_release_notes: true