Skip to content

Commit

Permalink
Move s390x conditionals to step level
Browse files Browse the repository at this point in the history
  • Loading branch information
emilymianeil committed Jul 12, 2023
1 parent 6ad6fbd commit 5f602ac
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ jobs:

build-s390x:
needs: set-product-version
if: ${{ endsWith(github.repository, '-enterprise') }}
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -188,15 +187,18 @@ jobs:
name: Go ${{ matrix.go }} ${{ matrix.goos }} ${{ matrix.goarch }} build
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
if: ${{ endsWith(github.repository, '-enterprise') }} || ${{ matrix.goarch }} != 's390x'

- name: Setup with node and yarn
if: ${{ endsWith(github.repository, '-enterprise') }} || ${{ matrix.goarch }} != 's390x'
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
node-version: '14'
cache: 'yarn'
cache-dependency-path: 'ui/yarn.lock'

- name: Build UI
if: ${{ endsWith(github.repository, '-enterprise') }} || ${{ matrix.goarch }} != 's390x'
run: |
CONSUL_VERSION=${{ needs.set-product-version.outputs.product-version }}
CONSUL_DATE=${{ needs.set-product-version.outputs.product-date }}
Expand All @@ -210,6 +212,7 @@ jobs:
rm -rf agent/uiserver/dist
mv ui/packages/consul-ui/dist agent/uiserver/
- name: Go Build
if: ${{ endsWith(github.repository, '-enterprise') }} || ${{ matrix.goarch }} != 's390x'
env:
PRODUCT_VERSION: ${{ needs.set-product-version.outputs.product-version }}
PRERELEASE_VERSION: ${{ needs.set-product-version.outputs.pre-version }}
Expand Down Expand Up @@ -378,12 +381,13 @@ jobs:
version: ${{ needs.set-product-version.outputs.product-version }}
zip_name: consul_${{ needs.set-product-version.outputs.product-version }}_linux_${{ matrix.arch }}.zip

if: ${{ endsWith(github.repository, '-enterprise') }} || ${{ matrix.arch != 's390x' }}
name: Verify ${{ matrix.arch }} linux binary
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
if: ${{ endsWith(github.repository, '-enterprise') }} || ${{ matrix.goarch }} != 's390x'

- name: Download ${{ matrix.arch }} zip
if: ${{ endsWith(github.repository, '-enterprise') }} || ${{ matrix.goarch }} != 's390x'
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: ${{ env.zip_name }}
Expand All @@ -396,6 +400,7 @@ jobs:
platforms: arm,arm64

- name: Run verification for ${{ matrix.arch }} binary
if: ${{ endsWith(github.repository, '-enterprise') }} || ${{ matrix.goarch }} != 's390x'
run: .github/scripts/verify_artifact.sh ${{ env.zip_name }} v${{ env.version }}

verify-darwin:
Expand Down

0 comments on commit 5f602ac

Please sign in to comment.