Skip to content

Commit

Permalink
Update build-serverless-agent.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
thedavl committed Sep 22, 2023
1 parent cdf0ba9 commit be44fd3
Showing 1 changed file with 7 additions and 28 deletions.
35 changes: 7 additions & 28 deletions .github/workflows/build-serverless-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: david.lee/mini-agent-azure-tags
- name: Install musl dependencies
run: rustup target add x86_64-unknown-linux-musl && sudo apt-get install musl-tools
- name: Build project
run: cargo build --release -p datadog-serverless-trace-mini-agent --target x86_64-unknown-linux-musl
- name: Upload artifacts for release step
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: datadog-serverless-agent-linux-amd64
Expand All @@ -23,36 +25,13 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: david.lee/mini-agent-azure-tags
- name: Build project
run: cargo build --release -p datadog-serverless-trace-mini-agent
- name: Upload artifacts for release step
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: datadog-serverless-agent-windows-amd64
path: target/release/datadog-serverless-trace-mini-agent.exe
upload:
name: Upload
needs: [build-windows, build-linux-musl]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download artifacts from build step
uses: actions/download-artifact@v3
with:
path: target/release/binaries
- name: UPX compress binaries
run: |
for file in target/release/binaries/*/*
do
chmod +x "$file"
upx "$file" --lzma
done
- name: Zip binaries
run: zip -r datadog-serverless-agent.zip *
working-directory: target/release/binaries
- name: Upload
uses: actions/upload-artifact@v3
with:
name: datadog-serverless-trace-mini-agent
path: target/release/binaries/datadog-serverless-agent.zip

0 comments on commit be44fd3

Please sign in to comment.