Lambda Layer Release July - Update Canaries #944
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR Build | |
on: | |
pull_request: | |
branches: [ main ] | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
build-artifacts: | |
runs-on: ubuntu-20.04 | |
name: Build artifacts - ${{ matrix.language }} | |
strategy: | |
matrix: | |
language: [ java, nodejs, python, dotnet, go ] | |
build_command: [ ./build.sh ] | |
architecture: [ amd64, arm64 ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '^1.20.5' | |
- uses: actions/setup-java@v3 | |
if: ${{ matrix.language == 'java' }} | |
with: | |
distribution: corretto | |
java-version: '17' | |
- name: Cache (Java) | |
uses: actions/cache@v3 | |
if: ${{ matrix.language == 'java' }} | |
with: | |
path: | | |
~/go/pkg/mod | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- uses: actions/setup-node@v3 | |
if: ${{ matrix.language == 'nodejs' }} | |
with: | |
node-version: '14' | |
- name: Cache (NodeJS) | |
uses: actions/cache@v3 | |
if: ${{ matrix.language == 'nodejs' }} | |
with: | |
path: | | |
~/go/pkg/mod | |
~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- uses: actions/setup-python@v4 | |
if: ${{ matrix.language == 'python' }} | |
with: | |
python-version: '3.x' | |
- name: Cache (Python) | |
uses: actions/cache@v3 | |
if: ${{ matrix.language == 'python' }} | |
with: | |
path: | | |
~/go/pkg/mod | |
~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- uses: actions/setup-dotnet@v3 | |
if: ${{ matrix.language == 'dotnet' }} | |
with: | |
dotnet-version: '6.0.405' | |
- name: Patch ADOT | |
run: ./patch-upstream.sh | |
- name: Build layers / sample functions | |
if: ${{ matrix.language != 'dotnet' && matrix.language != 'go' }} | |
run: GOARCH=${{ matrix.architecture }} ${{ matrix.build_command }} ${{ matrix.architecture }} | |
working-directory: ${{ matrix.language }} | |
- name: Build collector | |
if: ${{ matrix.language == 'dotnet' || matrix.language == 'go' }} | |
run: GOARCH=${{ matrix.architecture }} make package | |
working-directory: opentelemetry-lambda/collector |