summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2023-11-23 15:46:56 +0100
committerGitHub <[email protected]>2023-11-23 15:46:56 +0100
commit05551665afb0e404e0fff5205073928d2682a6a5 (patch)
tree99db9b7643c5fea9ff54418bc1ac1e2cb321d0f6
parentf4b263beb8023e5fde63e0471cab476d4abb112f (diff)
parentc2a4c5e86a1280be3ceb4d71fb0bccde0ba859bd (diff)
[#1786]: feature: support for the `ARM64` deb release
-rw-r--r--.github/workflows/release_dep_aarch64.yml95
-rw-r--r--go.mod2
-rw-r--r--go.sum4
3 files changed, 98 insertions, 3 deletions
diff --git a/.github/workflows/release_dep_aarch64.yml b/.github/workflows/release_dep_aarch64.yml
new file mode 100644
index 00000000..1500abfb
--- /dev/null
+++ b/.github/workflows/release_dep_aarch64.yml
@@ -0,0 +1,95 @@
+name: release_dep_arm64
+
+on:
+ release: # Docs: <https://help.github.com/en/articles/events-that-trigger-workflows#release-event-release>
+ types:
+ - released
+ - prereleased
+
+jobs:
+ build:
+ name: Build for ${{ matrix.os }} (${{ matrix.arch }}, ${{ matrix.compiler }})
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ linux ]
+ compiler: [ gcc ]
+ arch: [ arm64 ]
+
+ steps:
+ - name: Check out code
+ uses: actions/checkout@v4
+
+ - name: Set up Go
+ uses: actions/setup-go@v4
+ with:
+ go-version: stable
+
+ - name: Download dependencies
+ run: go mod download
+
+ - name: Generate builder values
+ id: values
+ run: |
+ echo "version=$(echo ${GITHUB_REF##*/} | sed -e 's/^[vV ]*//')" >> $GITHUB_OUTPUT
+ echo "timestamp=$(echo $(date +%FT%T%z))" >> $GITHUB_OUTPUT
+ echo "binary-name=rr" >> $GITHUB_OUTPUT
+ echo "sign-cert-name=rr.asc" >> $GITHUB_OUTPUT
+
+ - name: Import GPG key
+ uses: crazy-max/ghaction-import-gpg@v6
+ with:
+ gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }}
+ passphrase: ${{ secrets.GPG_PASS }}
+ git_user_signingkey: true
+ git_commit_gpgsign: false
+
+ - name: Compile binary file
+ env:
+ GOOS: ${{ matrix.os }}
+ GOARCH: ${{ matrix.arch }}
+ CC: ${{ matrix.compiler }}
+ GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
+ GPG_PASS: ${{secrets.GPG_PASS}}
+ CGO_ENABLED: 0
+ LDFLAGS: >-
+ -s
+ -X github.com/roadrunner-server/roadrunner/v2023/internal/meta.version=${{ steps.values.outputs.version }}
+ -X github.com/roadrunner-server/roadrunner/v2023/internal/meta.buildTime=${{ steps.values.outputs.timestamp }}
+ run: |
+ go build -trimpath -ldflags "$LDFLAGS" -o "./${{ steps.values.outputs.binary-name }}" ./cmd/rr
+ stat "./${{ steps.values.outputs.binary-name }}"
+ gpg --detach-sign --armor "./${{ steps.values.outputs.binary-name }}"
+
+ - name: Create DEB dirs
+ run: |
+ mkdir -p dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN
+ mkdir -p dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/usr/bin
+ ls -la dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64
+
+ - name: Create DEB control file
+ run: touch dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control
+
+ - name: Build Debian package
+ run: |
+ echo "Package: roadrunner-${{ steps.values.outputs.version }}-linux-arm64.deb" >> dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control
+ echo "Version: ${{ steps.values.outputs.version }}" >> dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control
+ echo "Section: custom" >> dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control
+ echo "Priority: optional" >> dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control
+ echo "Architecture: arm64" >> dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control
+ echo "Maintainer: roadrunner.dev" >> dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control
+ echo "Description: High-performance PHP application server, load-balancer, process manager written in Go and powered with plugins." >> dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control
+
+ cat dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/DEBIAN/control
+
+ cp "./${{ steps.values.outputs.binary-name }}" dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64/usr/bin/
+ dpkg --build dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64
+
+ - name: Upload dep to release
+ uses: svenstaro/upload-release-action@v2
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ file: dist/ubuntu/roadrunner-${{ steps.values.outputs.version }}-linux-arm64.deb
+ asset_name: roadrunner-${{ steps.values.outputs.version }}-linux-arm64.deb
+ tag: ${{ github.ref }}
diff --git a/go.mod b/go.mod
index 8758551d..5955ce81 100644
--- a/go.mod
+++ b/go.mod
@@ -58,7 +58,7 @@ require (
require (
github.com/andybalholm/brotli v1.0.6 // indirect
- github.com/aws/aws-sdk-go v1.48.2 // indirect
+ github.com/aws/aws-sdk-go v1.48.3 // indirect
github.com/aws/aws-sdk-go-v2 v1.23.1 // indirect
github.com/aws/aws-sdk-go-v2/config v1.25.5 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.16.4 // indirect
diff --git a/go.sum b/go.sum
index c6902986..86312f05 100644
--- a/go.sum
+++ b/go.sum
@@ -52,8 +52,8 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5
github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI=
github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
-github.com/aws/aws-sdk-go v1.48.2 h1:Lf7+Y4WmHB0AQLRQZA46diSwDa+LWbwY6IGaYoCVtTc=
-github.com/aws/aws-sdk-go v1.48.2/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
+github.com/aws/aws-sdk-go v1.48.3 h1:btYjT+opVFxUbRz+qSCjJe07cdX82BHmMX/FXYmoL7g=
+github.com/aws/aws-sdk-go v1.48.3/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk=
github.com/aws/aws-sdk-go-v2 v1.23.1 h1:qXaFsOOMA+HsZtX8WoCa+gJnbyW7qyFFBlPqvTSzbaI=
github.com/aws/aws-sdk-go-v2 v1.23.1/go.mod h1:i1XDttT4rnf6vxc9AuskLc6s7XBee8rlLilKlc03uAA=
github.com/aws/aws-sdk-go-v2/config v1.25.5 h1:UGKm9hpQS2hoK8CEJ1BzAW8NbUpvwDJJ4lyqXSzu8bk=