-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (52 loc) · 1.79 KB
/
Copy pathci.yml
File metadata and controls
59 lines (52 loc) · 1.79 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
name: Integration Test (Docker)
on:
push:
branches: [ "main" ]
pull_request:
jobs:
validate-action:
name: Validate Docker Action
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build and test compilation
uses: ./
with:
rust_version: '1.95.0'
cargo_lambda_version: '1.9.1'
command: |
cd examples/test-compilation/ || exit 1
echo "Starting Compilation"
cargo lambda -V
# Capture build output
cargo lambda build --release --output-format zip > /dev/null 2> out.log
BUILD_EXIT=$?
# Always write the full log to the step summary
if [ $BUILD_EXIT -eq 0 ]; then
{
printf "# Compiled successfully\n"
printf "<details><summary>Output:</summary>\n<pre>\n"
sed 's/&/\&/g; s/</\</g; s/>/\>/g' out.log
printf "</pre>\n</details>\n"
} >> "$GITHUB_STEP_SUMMARY"
else
{
printf "# Failed with error\n"
printf "<pre>\n"
sed 's/&/\&/g; s/</\</g; s/>/\>/g' out.log
printf "</pre>\n"
} >> "$GITHUB_STEP_SUMMARY"
fi
# Exit with the build's exit code, making the whole step fail on error
exit $BUILD_EXIT
- name: Archive production artifacts
if: false
uses: actions/upload-artifact@v4
with:
name: lambda-target-zip
path: |
examples/test-compilation/target/lambda/test-compilation/
- name: Echo output on ACT
if: ${{ env.GITHUB_ACTIONS_RUNNER == 'act' }}
run: echo "$GITHUB_STEP_SUMMARY"