23
23
type : boolean
24
24
description : " Boolean to enable the test of the archive plugin. Defaults to true."
25
25
default : true
26
+ check_foundation_enabled :
27
+ type : boolean
28
+ description : " Boolean to enable the check for Foundation dependency. Defaults to true."
29
+ default : true
26
30
matrix_linux_command :
27
31
type : string
28
32
description : " The command of the current Swift version linux matrix job to execute."
@@ -88,15 +92,12 @@ jobs:
88
92
COMMAND : ${{ inputs.matrix_linux_command }}
89
93
EXAMPLE : ${{ matrix.examples }}
90
94
run : |
91
- ./scripts/integration_tests.sh
92
- echo "✅ The examples compile correctly"
95
+ .github/workflows/scripts/integration_tests.sh
93
96
94
97
test-archive-plugin :
95
98
name : Test archive plugin
96
99
if : ${{ inputs.archive_plugin_enabled }}
97
100
runs-on : ubuntu-latest
98
- strategy :
99
- fail-fast : false
100
101
steps :
101
102
- name : Checkout repository
102
103
uses : actions/checkout@v4
@@ -106,25 +107,21 @@ jobs:
106
107
# https://github.com/actions/checkout/issues/766
107
108
run : git config --global --add safe.directory ${GITHUB_WORKSPACE}
108
109
- name : Test the archive plugin
109
- env :
110
- EXAMPLE : HelloWorld
111
- OUTPUT_FILE : .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/MyLambda/bootstrap
112
- ZIP_FILE : .build/plugins/AWSLambdaPackager/outputs/AWSLambdaPackager/MyLambda/MyLambda.zip
113
110
run : |
114
- pushd Examples/${EXAMPLE}
111
+ .github/workflows/scripts/check-archive-plugin.sh
115
112
116
- # package the example (docker and swift toolchain are installed on the GH runner)
117
- LAMBDA_USE_LOCAL_DEPS=../.. swift package archive --allow-network-connections docker
118
-
119
- # did the plugin generated a Linux binary?
120
- [ -f ${OUTPUT_FILE} ]
121
- file ${OUTPUT_FILE} | grep --silent ELF
122
-
123
- # did the plugin created a ZIP file?
124
- [ -f ${ZIP_FILE} ]
125
-
126
- # does the ZIP file contain the bootstrap?
127
- unzip -l ${ZIP_FILE} | grep --silent bootstrap
128
-
129
- echo "✅ The archive plugin is OK"
130
- popd
113
+ check-foundation :
114
+ name : No dependencies on Foundation
115
+ if : ${{ inputs.check_foundation_enabled }}
116
+ runs-on : ubuntu-latest
117
+ steps :
118
+ - name : Checkout repository
119
+ uses : actions/checkout@v4
120
+ with :
121
+ persist-credentials : false
122
+ - name : Mark the workspace as safe
123
+ # https://github.com/actions/checkout/issues/766
124
+ run : git config --global --add safe.directory ${GITHUB_WORKSPACE}
125
+ - name : Check for Foundation or ICU dependency
126
+ run : |
127
+ .github/workflows/scripts/check-link-foundation.sh
0 commit comments