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 be44fd3 commit d7a1918
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/build-serverless-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: david.lee/mini-agent-azure-tags
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
Expand All @@ -26,12 +26,38 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: david.lee/mini-agent-azure-tags
ref: david.lee/mini-agent-azure-tags
- name: Build project
run: cargo build --release -p datadog-serverless-trace-mini-agent
- 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-upx-compressed-binaries:
name: Upload UPX compressed binaries
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: compressed-binaries
path: target/release/binaries/datadog-serverless-agent.zip

0 comments on commit d7a1918

Please sign in to comment.