forked from open-telemetry/opentelemetry-lambda
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.42 KB
/
ci-collector.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: "Continuous Build (Collector)"
on:
push:
paths:
- 'collector/**'
- '.github/workflows/ci-collector.yml'
branches:
- main
pull_request:
paths:
- 'collector/**'
- '.github/workflows/ci-collector.yml'
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
architecture: [ amd64, arm64 ]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.19'
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build Collector Executable for ${{ matrix.architecture }} architecture
run: GOARCH=${{ matrix.architecture }} make package
working-directory: collector
- name: Get Lambda Layer amd64 architecture value
if: ${{ matrix.architecture == 'amd64' }}
run: echo LAMBDA_LAYER_ARCHITECTURE=x86 | tee --append $GITHUB_ENV
- name: Get Lambda Layer arm64 architecture value
if: ${{ matrix.architecture == 'arm64' }}
run: echo LAMBDA_LAYER_ARCHITECTURE=ARM | tee --append $GITHUB_ENV
- name: Confirm architecture of built collector
working-directory: collector/build/extensions
run: |
grep ${{ env.LAMBDA_LAYER_ARCHITECTURE }} <<< "$(file collector)"