-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild-datadog-serverless-compat.yml
More file actions
87 lines (85 loc) · 3.5 KB
/
build-datadog-serverless-compat.yml
File metadata and controls
87 lines (85 loc) · 3.5 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Build Datadog Serverless Compat
on:
workflow_call:
inputs:
runner:
required: true
type: string
jobs:
setup:
name: Setup
runs-on: ${{ inputs.runner }}
env:
CARGO_INCREMENTAL: "0"
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1.11.0
with:
cache: false
- uses: mozilla-actions/sccache-action@65101d47ea8028ed0c98a1cdea8dd9182e9b5133 #v0.0.8
build-datadog-serverless-compat:
name: Build Datadog Serverless Compat
needs: setup
runs-on: ${{ inputs.runner }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Protoc Binary
shell: bash
run: chmod +x ./scripts/install-protoc.sh && ./scripts/install-protoc.sh $HOME
- if: ${{ inputs.runner == 'ubuntu-24.04' }}
shell: bash
run: |
sudo apt-get update
rustup target add x86_64-unknown-linux-musl && sudo apt-get install -y musl-tools
cargo build --release -p datadog-serverless-compat --target x86_64-unknown-linux-musl
- if: ${{ inputs.runner == 'ubuntu-24.04' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
with:
name: linux-amd64
path: target/x86_64-unknown-linux-musl/release/datadog-serverless-compat
retention-days: 3
- if: ${{ inputs.runner == 'ubuntu-24.04-arm' }}
shell: bash
run: |
sudo apt-get update
rustup target add aarch64-unknown-linux-musl && sudo apt-get install -y musl-tools
cargo build --release -p datadog-serverless-compat --target aarch64-unknown-linux-musl
- if: ${{ inputs.runner == 'ubuntu-24.04-arm' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
with:
name: linux-arm64
path: target/aarch64-unknown-linux-musl/release/datadog-serverless-compat
retention-days: 3
- if: ${{ inputs.runner == 'windows-2022' }}
shell: bash
run: cargo build --release -p datadog-serverless-compat --features windows-pipes
- if: ${{ inputs.runner == 'windows-2022' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
with:
name: windows-amd64
path: target/release/datadog-serverless-compat.exe
retention-days: 3
- if: ${{ inputs.runner == 'windows-2022' }}
shell: bash
run: |
rustup target add i686-pc-windows-msvc
cargo build --release -p datadog-serverless-compat \
--target i686-pc-windows-msvc \
--features windows-pipes
- if: ${{ inputs.runner == 'windows-2022' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
with:
name: windows-ia32
path: target/i686-pc-windows-msvc/release/datadog-serverless-compat.exe
retention-days: 3
- if: ${{ inputs.runner == 'macos-14' }}
shell: bash
run: cargo build --release -p datadog-serverless-compat
- if: ${{ inputs.runner == 'macos-14' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
with:
name: darwin-arm64
path: target/release/datadog-serverless-compat
retention-days: 3