forked from valkey-io/valkey
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7328b7
commit a5d3f31
Showing
6 changed files
with
279 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"linux_targets": [ | ||
{ | ||
"arch": "x86_64", | ||
"target": "ubuntu/18.04", | ||
"type": "deb", | ||
"platform": "bionic" | ||
}, | ||
{ | ||
"arch": "x86_64", | ||
"target": "ubuntu/22.04", | ||
"type": "deb", | ||
"platform": "focal" | ||
}, | ||
{ | ||
"arch": "arm64", | ||
"target": "ubuntu/18.04", | ||
"type": "deb", | ||
"platform": "bionic" | ||
}, | ||
{ | ||
"arch": "arm64", | ||
"target": "ubuntu/20.04", | ||
"type": "deb", | ||
"platform": "focal" | ||
} | ||
], | ||
"macos_targets": [ | ||
{ | ||
"arch": "x86_64", | ||
"target": "catalina", | ||
"type": "zip", | ||
"platform": "catalina" | ||
} | ||
] | ||
} |
55 changes: 55 additions & 0 deletions
55
.github/workflows/actions/generate-package-build-matrix/actions.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Composite action to generate the matrix of targets to build packages for. | ||
description: Remove any duplication of this information so we only have to update in one place. | ||
|
||
inputs: | ||
ref: | ||
description: The commit, tag or branch of Valkey to checkout for building we then use to determine version for. | ||
required: true | ||
outputs: | ||
x86_64-build-matrix: | ||
description: The x86_64 build matrix. | ||
value: ${{ steps.set-matrix.outputs.x86matrix }} | ||
arm64-build-matrix: | ||
description: The arm64 build matrix. | ||
value: ${{ steps.set-matrix.outputs.armmatrix }} | ||
macos-build-matrix: | ||
description: The macos build matrix. | ||
value: ${{ steps.set-matrix.outputs.macosmatrix }} | ||
|
||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Checkout code for version check | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
path: version-check | ||
|
||
- name: Get targets | ||
run: | | ||
x86-arch=$(jq -cr '[.linux_targets[] | select(.arch|contains("x86_64"))]' .github/packaging/build-config.json) | ||
x86-matrix=$(echo "{ \"distro\" : $arm-arch }"|jq -c .) | ||
echo "X86_MATRIX=$x86-matrix" >> $GITHUB_ENV | ||
arm-arch=$(jq -cr '[.linux_targets[] | select(.arch|contains("arm64"))]' .github/packaging/build-config.json) | ||
arm-matrix=$(echo "{ \"distro\" : $arm-arch }"|jq -c .) | ||
echo "ARM_MATRIX=$arm-matrix" >> $GITHUB_ENV | ||
macos-arch=$(jq -cr '[.macos_targets[] | select(.arch|contains("x86_64"))]' .github/packaging/build-config.json) | ||
macos-matrix=$(echo "{ \"distro\" : $rpmtargets}"|jq -c .) | ||
echo "MACOS_MATRIX=$macos-matrix" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- id: set-matrix | ||
run: | | ||
echo $MATRIX | ||
echo $MATRIX| jq . | ||
echo "x86matrix=$X86_MATRIX" >> $GITHUB_OUTPUT | ||
echo $ARM_MATRIX | ||
echo $ARM_MATRIX| jq . | ||
echo "armmatrix=$ARM_MATRIX" >> $GITHUB_OUTPUT | ||
echo $RPM_MATRIX | ||
echo $RPM_MATRIX| jq . | ||
echo "macosmatrix=$MACOS_MATRIX" >> $GITHUB_OUTPUT | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Reusable workflow to build binary packages into S3 bucket | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: The version of Fluent Bit to create. | ||
type: string | ||
required: true | ||
ref: | ||
description: The commit, tag or branch of Fluent Bit to checkout for building that creates the version above. | ||
type: string | ||
required: true | ||
build_matrix: | ||
description: The build targets to produce as a JSON matrix. | ||
type: string | ||
required: true | ||
secrets: | ||
token: | ||
description: The Github token or similar to authenticate with. | ||
required: true | ||
bucket: | ||
description: The name of the S3 (US-East) bucket to push packages into. | ||
required: false | ||
access_key_id: | ||
description: The S3 access key id for the bucket. | ||
required: false | ||
secret_access_key: | ||
description: The S3 secret access key for the bucket. | ||
required: false | ||
|
||
jobs: | ||
build-valkey: | ||
# Capture source tarball and generate checksum for it | ||
name: Build ${{ matrix.distro.target }} ${{ matrix.distro.arch }} | ||
runs-on: ${{ (contains(matrix.distro.arch, 'arm' ) && (github.repository == 'valkey-io/valkey') && 'actuated-arm64-8cpu-16gb') || 'ubuntu-latest' }} | ||
permissions: | ||
contents: read | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJSON(inputs.build_matrix) }} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Reusable workflow to build binary packages into S3 bucket | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: The version of Fluent Bit to create. | ||
type: string | ||
required: true | ||
ref: | ||
description: The commit, tag or branch of Fluent Bit to checkout for building that creates the version above. | ||
type: string | ||
required: true | ||
build_matrix: | ||
description: The build targets to produce as a JSON matrix. | ||
type: string | ||
required: true | ||
secrets: | ||
token: | ||
description: The Github token or similar to authenticate with. | ||
required: true | ||
bucket: | ||
description: The name of the S3 (US-East) bucket to push packages into. | ||
required: false | ||
access_key_id: | ||
description: The S3 access key id for the bucket. | ||
required: false | ||
secret_access_key: | ||
description: The S3 secret access key for the bucket. | ||
required: false | ||
|
||
jobs: | ||
build-valkey: | ||
# Capture source tarball and generate checksum for it | ||
name: Build ${{ matrix.distro.target }} ${{ matrix.distro.arch }} | ||
runs-on: ${{ (contains(matrix.distro.arch, 'arm' ) && (github.repository == 'valkey-io/valkey') && 'actuated-arm64-8cpu-16gb') || 'ubuntu-latest' }} | ||
permissions: | ||
contents: read | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJSON(inputs.build_matrix) }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Reusable workflow to build binary packages into S3 bucket | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: The version of Fluent Bit to create. | ||
type: string | ||
required: true | ||
ref: | ||
description: The commit, tag or branch of Fluent Bit to checkout for building that creates the version above. | ||
type: string | ||
required: true | ||
build_matrix: | ||
description: The build targets to produce as a JSON matrix. | ||
type: string | ||
required: true | ||
secrets: | ||
token: | ||
description: The Github token or similar to authenticate with. | ||
required: true | ||
bucket: | ||
description: The name of the S3 (US-East) bucket to push packages into. | ||
required: false | ||
access_key_id: | ||
description: The S3 access key id for the bucket. | ||
required: false | ||
secret_access_key: | ||
description: The S3 secret access key for the bucket. | ||
required: false | ||
|
||
jobs: | ||
build-valkey: | ||
# Capture source tarball and generate checksum for it | ||
name: Build ${{ matrix.distro.target }} ${{ matrix.distro.arch }} | ||
runs-on: ${{ (contains(matrix.distro.arch, 'arm' ) && (github.repository == 'valkey-io/valkey') && 'actuated-arm64-8cpu-16gb') || 'ubuntu-latest' }} | ||
permissions: | ||
contents: read | ||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJSON(inputs.build_matrix) }} |