|
|
@ -16,8 +16,27 @@ env: |
|
|
|
METADATA: oss |
|
|
|
METADATA: oss |
|
|
|
|
|
|
|
|
|
|
|
jobs: |
|
|
|
jobs: |
|
|
|
set-product-version: |
|
|
|
setup: # Detect oss v. ent and set runner type |
|
|
|
|
|
|
|
name: Setup |
|
|
|
runs-on: ubuntu-latest |
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
|
|
|
outputs: |
|
|
|
|
|
|
|
runner-standard: ${{ steps.setup-outputs.outputs.runner-standard }} |
|
|
|
|
|
|
|
steps: |
|
|
|
|
|
|
|
- id: setup-outputs |
|
|
|
|
|
|
|
name: Setup outputs |
|
|
|
|
|
|
|
run: | |
|
|
|
|
|
|
|
github_repository="${{ github.repository }}" |
|
|
|
|
|
|
|
if [ "${github_repository##*/}" == "consul-enterprise" ] ; then |
|
|
|
|
|
|
|
echo 'linux-runner-standard=["self-hosted","linux"]' >> $GITHUB_OUTPUT |
|
|
|
|
|
|
|
echo 'macos-runner-standard-macos=["self-hosted","ondemand","os=macos"]' >> $GITHUB_OUTPUT |
|
|
|
|
|
|
|
echo 'enterprise=1' >> $GITHUB_OUTPUT |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
echo 'linux-runner-standard=["ubuntu-latest"]' >> $GITHUB_OUTPUT |
|
|
|
|
|
|
|
echo 'macos-runner-standard=["macos-latest"]' >> $GITHUB_OUTPUT |
|
|
|
|
|
|
|
echo 'enterprise=' >> $GITHUB_OUTPUT |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
set-product-version: |
|
|
|
|
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.linux-runner-standard) }} |
|
|
|
outputs: |
|
|
|
outputs: |
|
|
|
product-version: ${{ steps.set-product-version.outputs.product-version }} |
|
|
|
product-version: ${{ steps.set-product-version.outputs.product-version }} |
|
|
|
base-product-version: ${{ steps.set-product-version.outputs.base-product-version }} |
|
|
|
base-product-version: ${{ steps.set-product-version.outputs.base-product-version }} |
|
|
@ -46,7 +65,7 @@ jobs: |
|
|
|
" |
|
|
|
" |
|
|
|
validate-outputs: |
|
|
|
validate-outputs: |
|
|
|
needs: set-product-version |
|
|
|
needs: set-product-version |
|
|
|
runs-on: ubuntu-latest |
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.linux-runner-standard) }} |
|
|
|
steps: |
|
|
|
steps: |
|
|
|
- name: Validate Outputs |
|
|
|
- name: Validate Outputs |
|
|
|
run: | |
|
|
|
run: | |
|
|
@ -58,7 +77,7 @@ jobs: |
|
|
|
echo "Ldflags: ${{ needs.set-product-version.outputs.shared-ldflags }}" |
|
|
|
echo "Ldflags: ${{ needs.set-product-version.outputs.shared-ldflags }}" |
|
|
|
generate-metadata-file: |
|
|
|
generate-metadata-file: |
|
|
|
needs: set-product-version |
|
|
|
needs: set-product-version |
|
|
|
runs-on: ubuntu-latest |
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.linux-runner-standard) }} |
|
|
|
outputs: |
|
|
|
outputs: |
|
|
|
filepath: ${{ steps.generate-metadata-file.outputs.filepath }} |
|
|
|
filepath: ${{ steps.generate-metadata-file.outputs.filepath }} |
|
|
|
steps: |
|
|
|
steps: |
|
|
@ -78,7 +97,7 @@ jobs: |
|
|
|
|
|
|
|
|
|
|
|
build: |
|
|
|
build: |
|
|
|
needs: set-product-version |
|
|
|
needs: set-product-version |
|
|
|
runs-on: ubuntu-latest |
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.linux-runner-standard) }} |
|
|
|
strategy: |
|
|
|
strategy: |
|
|
|
matrix: |
|
|
|
matrix: |
|
|
|
include: |
|
|
|
include: |
|
|
@ -174,7 +193,7 @@ jobs: |
|
|
|
|
|
|
|
|
|
|
|
build-darwin: |
|
|
|
build-darwin: |
|
|
|
needs: set-product-version |
|
|
|
needs: set-product-version |
|
|
|
runs-on: macos-latest |
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.macos-runner-standard) }} |
|
|
|
strategy: |
|
|
|
strategy: |
|
|
|
matrix: |
|
|
|
matrix: |
|
|
|
goos: [ darwin ] |
|
|
|
goos: [ darwin ] |
|
|
@ -226,7 +245,7 @@ jobs: |
|
|
|
needs: |
|
|
|
needs: |
|
|
|
- set-product-version |
|
|
|
- set-product-version |
|
|
|
- build |
|
|
|
- build |
|
|
|
runs-on: ubuntu-latest |
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.linux-runner-standard) }} |
|
|
|
strategy: |
|
|
|
strategy: |
|
|
|
matrix: |
|
|
|
matrix: |
|
|
|
arch: ["386", "amd64", "arm", "arm64"] |
|
|
|
arch: ["386", "amd64", "arm", "arm64"] |
|
|
@ -263,7 +282,7 @@ jobs: |
|
|
|
needs: |
|
|
|
needs: |
|
|
|
- set-product-version |
|
|
|
- set-product-version |
|
|
|
- build |
|
|
|
- build |
|
|
|
runs-on: ubuntu-latest |
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.linux-runner-standard) }} |
|
|
|
env: |
|
|
|
env: |
|
|
|
repo: ${{github.event.repository.name}} |
|
|
|
repo: ${{github.event.repository.name}} |
|
|
|
version: ${{needs.set-product-version.outputs.product-version}} |
|
|
|
version: ${{needs.set-product-version.outputs.product-version}} |
|
|
@ -283,7 +302,7 @@ jobs: |
|
|
|
needs: |
|
|
|
needs: |
|
|
|
- set-product-version |
|
|
|
- set-product-version |
|
|
|
- build |
|
|
|
- build |
|
|
|
runs-on: ubuntu-latest |
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.linux-runner-standard) }} |
|
|
|
env: |
|
|
|
env: |
|
|
|
repo: ${{github.event.repository.name}} |
|
|
|
repo: ${{github.event.repository.name}} |
|
|
|
version: ${{needs.set-product-version.outputs.product-version}} |
|
|
|
version: ${{needs.set-product-version.outputs.product-version}} |
|
|
@ -315,7 +334,7 @@ jobs: |
|
|
|
needs: |
|
|
|
needs: |
|
|
|
- set-product-version |
|
|
|
- set-product-version |
|
|
|
- build |
|
|
|
- build |
|
|
|
runs-on: ubuntu-latest |
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.linux-runner-standard) }} |
|
|
|
strategy: |
|
|
|
strategy: |
|
|
|
matrix: |
|
|
|
matrix: |
|
|
|
arch: ["386", "amd64", "arm", "arm64"] |
|
|
|
arch: ["386", "amd64", "arm", "arm64"] |
|
|
@ -347,7 +366,7 @@ jobs: |
|
|
|
needs: |
|
|
|
needs: |
|
|
|
- set-product-version |
|
|
|
- set-product-version |
|
|
|
- build-darwin |
|
|
|
- build-darwin |
|
|
|
runs-on: macos-latest |
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.macos-runner-standard) }} |
|
|
|
strategy: |
|
|
|
strategy: |
|
|
|
fail-fast: true |
|
|
|
fail-fast: true |
|
|
|
env: |
|
|
|
env: |
|
|
@ -373,7 +392,7 @@ jobs: |
|
|
|
needs: |
|
|
|
needs: |
|
|
|
- build |
|
|
|
- build |
|
|
|
- set-product-version |
|
|
|
- set-product-version |
|
|
|
runs-on: ubuntu-latest |
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.linux-runner-standard) }} |
|
|
|
strategy: |
|
|
|
strategy: |
|
|
|
matrix: |
|
|
|
matrix: |
|
|
|
arch: ["i386", "amd64", "armhf", "arm64"] |
|
|
|
arch: ["i386", "amd64", "armhf", "arm64"] |
|
|
@ -410,7 +429,7 @@ jobs: |
|
|
|
needs: |
|
|
|
needs: |
|
|
|
- build |
|
|
|
- build |
|
|
|
- set-product-version |
|
|
|
- set-product-version |
|
|
|
runs-on: ubuntu-latest |
|
|
|
runs-on: ${{ fromJSON(needs.setup.outputs.linux-runner-standard) }} |
|
|
|
strategy: |
|
|
|
strategy: |
|
|
|
matrix: |
|
|
|
matrix: |
|
|
|
# TODO(eculver): re-enable when there is a smaller verification container available |
|
|
|
# TODO(eculver): re-enable when there is a smaller verification container available |
|
|
|