From 15320032a9dbf4b10b3094a66a19143a20e30c8e Mon Sep 17 00:00:00 2001 From: Greg Albrecht Date: Thu, 25 Apr 2024 19:46:10 -0700 Subject: [PATCH 01/11] adding testfile --- test_ | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test_ diff --git a/test_ b/test_ new file mode 100644 index 0000000000..e69de29bb2 From a9a2588130f07b908896ef19a534107c9d2f4545 Mon Sep 17 00:00:00 2001 From: Greg Albrecht Date: Thu, 25 Apr 2024 20:27:24 -0700 Subject: [PATCH 02/11] added arm64 build action --- .github/workflows/build_arm64.yml | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build_arm64.yml diff --git a/.github/workflows/build_arm64.yml b/.github/workflows/build_arm64.yml new file mode 100644 index 0000000000..a88379dc27 --- /dev/null +++ b/.github/workflows/build_arm64.yml @@ -0,0 +1,34 @@ +name: Build (Docker/Windows) + +on: + push: + branches: + - 'main' + tags: + - '*' + pull_request: + workflow_dispatch: + + +jobs: + linux-arm64: + runs-on: buildjet-4vcpu-ubuntu-2204-arm + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies + run: apt install -y aha git make gcc g++ cmake pkg-config librtlsdr-dev whiptail libpq-dev + + - name: build AIS-catcher + run: mkdir build; cd build; cmake ..; make + + - name: upload artifact + run: mkdir output; cp build/AIS-catcher output/ + + - name: Upload Artifacts linux-arm64 + uses: actions/upload-artifact@v3 + with: + name: "AIS-catcher linux-arm64" + path: | + output From efd9e5aeb4d33bb2c9174611b4158fffebe8d5fc Mon Sep 17 00:00:00 2001 From: Greg Albrecht Date: Thu, 25 Apr 2024 20:56:41 -0700 Subject: [PATCH 03/11] testing debian builder --- .github/workflows/build_arm64.yml | 39 ++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_arm64.yml b/.github/workflows/build_arm64.yml index a88379dc27..911b1d8b8e 100644 --- a/.github/workflows/build_arm64.yml +++ b/.github/workflows/build_arm64.yml @@ -21,14 +21,47 @@ jobs: run: apt install -y aha git make gcc g++ cmake pkg-config librtlsdr-dev whiptail libpq-dev - name: build AIS-catcher - run: mkdir build; cd build; cmake ..; make + run: | + mkdir build + cd build + cmake .. + make - name: upload artifact - run: mkdir output; cp build/AIS-catcher output/ - + run: | + mkdir output + cp build/AIS-catcher output/ + - name: Upload Artifacts linux-arm64 uses: actions/upload-artifact@v3 with: name: "AIS-catcher linux-arm64" path: | output + + build-deb: + runs-on: ubuntu-latest + needs: linux-arm64 + + steps: + - name: Download all workflow run artifacts + uses: actions/download-artifact@v4 + + - name: create sample script + run: | + mkdir -p .debpkg/usr/local/bin + cp output/AIS-catcher .debpkg/usr/local/bin + chmod +x .debpkg/usr/local/bin/AIS-catcher + # create DEBIAN directory if you want to add other pre/post scripts + mkdir -p .debpkg/DEBIAN + echo -e "echo postinst" > .debpkg/DEBIAN/postinst + chmod +x .debpkg/DEBIAN/postinst + + - uses: jiro4989/build-deb-action@v3 + with: + package: AIS-catcher + package_root: .debpkg + maintainer: Greg Albrecht + version: ${{ github.ref }} # refs/tags/v*.*.* + arch: 'arm64' + desc: 'A multi-platform AIS Receiver' \ No newline at end of file From b319f85bc72774b754702d322f97583ca1081df1 Mon Sep 17 00:00:00 2001 From: Greg Albrecht Date: Thu, 25 Apr 2024 21:11:20 -0700 Subject: [PATCH 04/11] testing debian builder --- .github/workflows/build_arm64.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_arm64.yml b/.github/workflows/build_arm64.yml index 911b1d8b8e..0b01d3a5bc 100644 --- a/.github/workflows/build_arm64.yml +++ b/.github/workflows/build_arm64.yml @@ -29,13 +29,14 @@ jobs: - name: upload artifact run: | - mkdir output + mkdir -p output/plugins cp build/AIS-catcher output/ + cp plugins/* output/plugins/ - name: Upload Artifacts linux-arm64 uses: actions/upload-artifact@v3 with: - name: "AIS-catcher linux-arm64" + name: "AIS-catcher_linux-arm64" path: | output @@ -47,11 +48,15 @@ jobs: - name: Download all workflow run artifacts uses: actions/download-artifact@v4 - - name: create sample script + - name: Create package structure run: | mkdir -p .debpkg/usr/local/bin - cp output/AIS-catcher .debpkg/usr/local/bin + mkdir -p .debpkg/usr/share/aiscatcher/my-plugins + unzip output/*.zip + cp output/AIS-catcher .debpkg/usr/local/bin/ + cp output/plugins/* .debpkg/usr/share/aiscatcher/my-plugins/ chmod +x .debpkg/usr/local/bin/AIS-catcher + # create DEBIAN directory if you want to add other pre/post scripts mkdir -p .debpkg/DEBIAN echo -e "echo postinst" > .debpkg/DEBIAN/postinst From 658e984514f552eddc853bf3619fa49373972607 Mon Sep 17 00:00:00 2001 From: Greg Albrecht Date: Thu, 25 Apr 2024 21:11:36 -0700 Subject: [PATCH 05/11] testing debian builder --- .github/workflows/build_arm64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_arm64.yml b/.github/workflows/build_arm64.yml index 0b01d3a5bc..06e786b79f 100644 --- a/.github/workflows/build_arm64.yml +++ b/.github/workflows/build_arm64.yml @@ -1,4 +1,4 @@ -name: Build (Docker/Windows) +name: Build Debian arm64 on: push: From 496c369af9b7590fc078e6e6988f6bbca1fb31be Mon Sep 17 00:00:00 2001 From: Greg Albrecht Date: Thu, 25 Apr 2024 21:15:41 -0700 Subject: [PATCH 06/11] testing debian builder --- .github/workflows/build_arm64.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_arm64.yml b/.github/workflows/build_arm64.yml index 06e786b79f..bf24f99c3d 100644 --- a/.github/workflows/build_arm64.yml +++ b/.github/workflows/build_arm64.yml @@ -47,14 +47,17 @@ jobs: steps: - name: Download all workflow run artifacts uses: actions/download-artifact@v4 - + with: + name: "AIS-catcher_linux-arm64" + - name: Create package structure run: | mkdir -p .debpkg/usr/local/bin mkdir -p .debpkg/usr/share/aiscatcher/my-plugins - unzip output/*.zip - cp output/AIS-catcher .debpkg/usr/local/bin/ - cp output/plugins/* .debpkg/usr/share/aiscatcher/my-plugins/ + ls -alR + unzip *.zip + cp AIS-catcher .debpkg/usr/local/bin/ + cp plugins/* .debpkg/usr/share/aiscatcher/my-plugins/ chmod +x .debpkg/usr/local/bin/AIS-catcher # create DEBIAN directory if you want to add other pre/post scripts From 851684ccabc83d01508c6bf61944be712548873b Mon Sep 17 00:00:00 2001 From: Greg Albrecht Date: Thu, 25 Apr 2024 21:19:08 -0700 Subject: [PATCH 07/11] fixing archive action tool ver --- .github/workflows/build_arm64.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_arm64.yml b/.github/workflows/build_arm64.yml index bf24f99c3d..29d5588feb 100644 --- a/.github/workflows/build_arm64.yml +++ b/.github/workflows/build_arm64.yml @@ -34,7 +34,7 @@ jobs: cp plugins/* output/plugins/ - name: Upload Artifacts linux-arm64 - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: "AIS-catcher_linux-arm64" path: | From 60ece959b1293afdfcd696a5516c21cf5d1db4b9 Mon Sep 17 00:00:00 2001 From: Greg Albrecht Date: Thu, 25 Apr 2024 21:24:12 -0700 Subject: [PATCH 08/11] ok, no zip file --- .github/workflows/build_arm64.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_arm64.yml b/.github/workflows/build_arm64.yml index 29d5588feb..5c13931c18 100644 --- a/.github/workflows/build_arm64.yml +++ b/.github/workflows/build_arm64.yml @@ -55,17 +55,18 @@ jobs: mkdir -p .debpkg/usr/local/bin mkdir -p .debpkg/usr/share/aiscatcher/my-plugins ls -alR - unzip *.zip cp AIS-catcher .debpkg/usr/local/bin/ cp plugins/* .debpkg/usr/share/aiscatcher/my-plugins/ chmod +x .debpkg/usr/local/bin/AIS-catcher - + # create DEBIAN directory if you want to add other pre/post scripts mkdir -p .debpkg/DEBIAN echo -e "echo postinst" > .debpkg/DEBIAN/postinst chmod +x .debpkg/DEBIAN/postinst + ls -alR - - uses: jiro4989/build-deb-action@v3 + - name: Run build-deb-action from jiro4989 + uses: jiro4989/build-deb-action@v3 with: package: AIS-catcher package_root: .debpkg From 975c3c0b4d9f78346acf8ab23dfbcfc0959685b0 Mon Sep 17 00:00:00 2001 From: Greg Albrecht Date: Thu, 25 Apr 2024 21:39:02 -0700 Subject: [PATCH 09/11] fixed version tag --- .github/workflows/build_arm64.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_arm64.yml b/.github/workflows/build_arm64.yml index 5c13931c18..6609ddffc8 100644 --- a/.github/workflows/build_arm64.yml +++ b/.github/workflows/build_arm64.yml @@ -71,6 +71,8 @@ jobs: package: AIS-catcher package_root: .debpkg maintainer: Greg Albrecht - version: ${{ github.ref }} # refs/tags/v*.*.* + # ${{ github.ref }} + # refs/tags/v*.*.* + version: "1.0.0" arch: 'arm64' desc: 'A multi-platform AIS Receiver' \ No newline at end of file From 1d877403c4c0c06feaf9321b3b8fc19ff1ce8895 Mon Sep 17 00:00:00 2001 From: Greg Albrecht Date: Thu, 25 Apr 2024 22:06:37 -0700 Subject: [PATCH 10/11] adding artifact uploader --- .github/workflows/build_arm64.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_arm64.yml b/.github/workflows/build_arm64.yml index 6609ddffc8..44c0c0bcf9 100644 --- a/.github/workflows/build_arm64.yml +++ b/.github/workflows/build_arm64.yml @@ -75,4 +75,31 @@ jobs: # refs/tags/v*.*.* version: "1.0.0" arch: 'arm64' - desc: 'A multi-platform AIS Receiver' \ No newline at end of file + desc: 'A multi-platform AIS Receiver' + + - uses: actions/upload-artifact@v4 + with: + name: artifact-deb + path: | + *.deb + + - name: Create Release + id: create_release + uses: actions/create-release@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + + - name: Upload Release Asset + id: upload-release-asset + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: *.deb + tag: ${{ github.ref }} + overwrite: true + file_glob: true \ No newline at end of file From e7332c55d284a27a75a908548f29c3844bdc76af Mon Sep 17 00:00:00 2001 From: Greg Albrecht Date: Thu, 25 Apr 2024 22:07:52 -0700 Subject: [PATCH 11/11] adding artifact uploader --- .github/workflows/build_arm64.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_arm64.yml b/.github/workflows/build_arm64.yml index 44c0c0bcf9..a312eeef42 100644 --- a/.github/workflows/build_arm64.yml +++ b/.github/workflows/build_arm64.yml @@ -99,7 +99,8 @@ jobs: uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: *.deb + file: | + *.deb tag: ${{ github.ref }} overwrite: true file_glob: true \ No newline at end of file