|
8 | 8 | - "*-dd*"
|
9 | 9 | permissions: write-all
|
10 | 10 | jobs:
|
11 |
| - build: |
12 |
| - runs-on: ubuntu-latest |
| 11 | + build-arm64: |
| 12 | + runs-on: ubuntu-24.04-arm |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + platform: ["linux/arm64"] |
13 | 16 | steps:
|
14 | 17 | - uses: actions/checkout@v4
|
15 | 18 | with:
|
16 | 19 | fetch-depth: 0
|
17 |
| - - name: Set release version environment variable |
18 |
| - run: echo RELEASE_VERSION=${GITHUB_REF#refs/tags/} >> $GITHUB_ENV |
| 20 | + - name: Set environment variables |
| 21 | + id: set_env |
| 22 | + run: | |
| 23 | + echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV |
| 24 | + echo "TARGET_OS=$(echo ${{ matrix.platform }} | cut -d'/' -f1)" >> $GITHUB_ENV |
| 25 | + echo "TARGET_ARCH=$(echo ${{ matrix.platform }} | cut -d'/' -f2)" >> $GITHUB_ENV |
| 26 | + export GOEXPERIMENT=boringcrypto |
19 | 27 | env:
|
20 | 28 | GITHUB_REF: ${{ github.ref }}
|
21 | 29 | - name: Build etcd
|
22 |
| - run: REPOSITORY=https://github.com/${{ env.GITHUB_REPOSITORY}}.git CGO_ENABLED=1 GOEXPERIMENT=boringcrypto ./scripts/build-binary ${{ env.RELEASE_VERSION }} |
| 30 | + run: | |
| 31 | + REPOSITORY=https://github.com/${{ env.GITHUB_REPOSITORY}}.git \ |
| 32 | + CGO_ENABLED=1 \ |
| 33 | + GO_BUILD_FLAGS="-tags=fips" \ |
| 34 | + TARGET_OS=${TARGET_OS} \ |
| 35 | + TARGET_ARCH=${TARGET_ARCH} \ |
| 36 | + ./scripts/build-release-single-target ${{ env.RELEASE_VERSION }} |
| 37 | + env: |
| 38 | + GITHUB_REPOSITORY: ${{ github.repository }} |
| 39 | + - name: Calculate checksums |
| 40 | + id: calculate_checksums |
| 41 | + shell: bash |
| 42 | + working-directory: release/ |
| 43 | + run: ls . | grep -E '\.tar.gz$|\.zip$' | xargs shasum -a 256 > ./SHA256SUMS |
| 44 | + - uses: actions/upload-artifact@v4 |
| 45 | + with: |
| 46 | + name: etcd_output |
| 47 | + path: release/ |
| 48 | + build: |
| 49 | + strategy: |
| 50 | + matrix: |
| 51 | + platform: ["linux/amd64"] |
| 52 | + runs-on: ubuntu-latest |
| 53 | + steps: |
| 54 | + - uses: actions/checkout@v4 |
| 55 | + with: |
| 56 | + fetch-depth: 0 |
| 57 | + - name: Install cross-compilation toolchain |
| 58 | + run: | |
| 59 | + sudo apt-get update |
| 60 | + sudo apt-get install -y gcc-aarch64-linux-gnu |
| 61 | + - name: Set environment variables |
| 62 | + id: set_env |
| 63 | + run: | |
| 64 | + echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV |
| 65 | + echo "TARGET_OS=$(echo ${{ matrix.platform }} | cut -d'/' -f1)" >> $GITHUB_ENV |
| 66 | + echo "TARGET_ARCH=$(echo ${{ matrix.platform }} | cut -d'/' -f2)" >> $GITHUB_ENV |
| 67 | + export GOEXPERIMENT=boringcrypto |
| 68 | + - name: Build etcd |
| 69 | + run: | |
| 70 | + REPOSITORY=https://github.com/${{ env.GITHUB_REPOSITORY}}.git \ |
| 71 | + CGO_ENABLED=1 \ |
| 72 | + TARGET_OS=${TARGET_OS} \ |
| 73 | + TARGET_ARCH=${TARGET_ARCH} \ |
| 74 | + ./scripts/build-release-single-target ${{ env.RELEASE_VERSION }} |
23 | 75 | env:
|
24 | 76 | GITHUB_REPOSITORY: ${{ github.repository }}
|
25 | 77 | - name: Calculate checksums
|
|
0 commit comments