Skip to content

Commit 3043c97

Browse files
committed
Updating CI to build tegola_lambda for arm64 and amd64
1 parent af61e29 commit 3043c97

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

.github/actions/tegola_upload_path/action.yml renamed to .github/actions/tegola-upload-path/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ runs:
1515
using: "composite"
1616
steps:
1717
- name: set env (not Windows)
18+
if: ${{ runner.os != 'Windows' }}
1819
run: echo "TEGOLA_PATH=cmd/${{inputs.name}}/" >> $GITHUB_ENV
1920
shell: bash
20-
if: ${{ runner.os != 'Windows' }}
21+
2122
- name: set env (Windows)
23+
if: ${{ runner.os == 'Windows' }}
2224
run: echo "TEGOLA_PATH=cmd\\${{inputs.name}}\\" >> $GITHUB_ENV
2325
shell: bash
24-
if: ${{ runner.os == 'Windows' }}
26+
2527
- id: compute-path
2628
run: echo "::set-output name=dir-path::${TEGOLA_PATH}"
2729
shell: bash

.github/actions/upload-artifact/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ runs:
1717
using: "composite"
1818
steps:
1919
- id: zip-path
20-
uses: ./.github/actions/tegola_upload_path
20+
uses: ./.github/actions/tegola-upload-path
2121
with:
2222
name: ${{ inputs.artifact_name }}
2323

.github/workflows/on_release_publish.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,10 @@ jobs:
117117
env:
118118
# build architecture
119119
GOOS: linux
120+
GOARCH: arm64
120121
run: |
121122
cd cmd/tegola
122-
GOARCH=arm64 go build -mod vendor -ldflags "-w -X ${BUILD_PKG}.Version=${VERSION} -X ${BUILD_PKG}.GitRevision=${GIT_REVISION} -X ${BUILD_PKG}.GitBranch=${GIT_BRANCH}"
123+
go build -mod vendor -ldflags "-w -X ${BUILD_PKG}.Version=${VERSION} -X ${BUILD_PKG}.GitRevision=${GIT_REVISION} -X ${BUILD_PKG}.GitBranch=${GIT_BRANCH}"
123124
124125
- name: Upload artifact
125126
uses: ./.github/actions/upload-artifact
@@ -140,27 +141,27 @@ jobs:
140141
- name: Setup env
141142
uses: ./.github/actions/tegola-setup-env
142143
with:
143-
ui: false
144+
ui: true
144145
go: false
145146

146147
- name: Build tegola_lambda
147148
uses: ./.github/actions/amazon-linux-build-action
149+
env:
150+
GOARCH: amd64 # set the target build architecture
148151
with:
149152
args: '...'
150153

151154
- name: Upload artifact
152155
uses: ./.github/actions/upload-artifact
153156
with:
154157
github_token: ${{ secrets.GITHUB_TOKEN }}
155-
artifact_name: "tegola_lambda_amd64"
156-
upload_postfix: ""
158+
artifact_name: "bootstrap"
159+
upload_postfix: "_amd64"
157160

158161
build_tegola_lambda_arm64:
159162
name: Build tegola_lambda on Amazon Linux
160163
needs: [gen_version]
161164
runs-on: ubuntu-22.04
162-
env:
163-
GOARCH: arm64
164165

165166
steps:
166167
- name: Check out actions
@@ -169,21 +170,22 @@ jobs:
169170
- name: Setup env
170171
uses: ./.github/actions/tegola-setup-env
171172
with:
172-
ui: false
173+
ui: true
173174
go: false
174175

175176
- name: Build tegola_lambda
176177
uses: ./.github/actions/amazon-linux-build-action
178+
env:
179+
GOARCH: arm64 # set the target build architecture
177180
with:
178181
args: '...'
179182

180183
- name: Upload artifact
181184
uses: ./.github/actions/upload-artifact
182185
with:
183186
github_token: ${{ secrets.GITHUB_TOKEN }}
184-
artifact_name: "tegola_lambda_arm64"
185-
upload_postfix: ""
186-
187+
artifact_name: "bootstrap"
188+
upload_postfix: "_arm64"
187189

188190
build_macos:
189191
name: Build for MacOS

0 commit comments

Comments
 (0)