Skip to content

Commit 0c8acb8

Browse files
committed
Comfort the CI before static linking is stable
1 parent 3359646 commit 0c8acb8

File tree

2 files changed

+17
-31
lines changed

2 files changed

+17
-31
lines changed

.github/workflows/CI.yml

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,16 @@ jobs:
2020
- name: Test
2121
run: swift test --enable-test-discovery
2222
- name: Test CloudFunctions example
23-
run: |
24-
cd Examples/CloudFunctions
25-
swift build
23+
working-directory: Examples/CloudFunctions
24+
run: swift build
2625
- name: Test static linking
26+
working-directory: Examples/CloudFunctions
2727
run: |
28-
cd Examples/CloudFunctions
29-
swift build -c release -Xswiftc -static-executable
28+
yum install libxml2-static zlib-static -y
29+
swift build --product APIGateway -c release -Xswiftc -static-executable
3030
- name: Test LocalDebugging example
31-
run: |
32-
cd Examples/LocalDebugging/MyCloudFunction
33-
swift build
34-
swift build -c release -Xswiftc -static-executable
31+
working-directory: Examples/LocalDebugging/MyCloudFunction
32+
run: swift build
3533

3634
test-linux-release:
3735
name: Test on Linux
@@ -54,18 +52,11 @@ jobs:
5452
- name: Test
5553
run: swift test --enable-test-discovery
5654
- name: Test CloudFunctions example
57-
run: |
58-
cd Examples/CloudFunctions
59-
swift build
60-
- name: Test static linking
61-
run: |
62-
cd Examples/CloudFunctions
63-
swift build -c release -Xswiftc -static-executable
55+
working-directory: Examples/CloudFunctions
56+
run: swift build
6457
- name: Test LocalDebugging example
65-
run: |
66-
cd Examples/LocalDebugging/MyCloudFunction
67-
swift build
68-
swift build -c release -Xswiftc -static-executable
58+
working-directory: Examples/LocalDebugging/MyCloudFunction
59+
run: swift build
6960

7061
test-linux-nightly:
7162
name: Test on Linux
@@ -87,18 +78,11 @@ jobs:
8778
- name: Test
8879
run: swift test --enable-test-discovery
8980
- name: Test CloudFunctions example
90-
run: |
91-
cd Examples/CloudFunctions
92-
swift build
93-
- name: Test static linking
94-
run: |
95-
cd Examples/CloudFunctions
96-
swift build -c release -Xswiftc -static-executable
81+
working-directory: Examples/CloudFunctions
82+
run: swift build
9783
- name: Test LocalDebugging example
98-
run: |
99-
cd Examples/LocalDebugging/MyCloudFunction
100-
swift build
101-
swift build -c release -Xswiftc -static-executable
84+
working-directory: Examples/LocalDebugging/MyCloudFunction
85+
run: swift build
10286

10387
test-macos:
10488
name: Test on macOS

Examples/CloudFunctions/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ cd swift-tencent-scf-runtime/Examples/CloudFunctions
1111

1212
Note: The example scripts assume you have [jq](https://stedolan.github.io/jq/download/) command line tool installed. You're recommended to deploy with Serverless Framework in your own project.
1313

14+
FIXME: The `CurrencyExchange` example cannot be statically linked currently.
15+
1416
## Deployment instructions using TCCLI and COSCMD
1517

1618
Steps to deploy this sample to Tencent SCF Platform using TCCLI and COSCMD:

0 commit comments

Comments
 (0)