@@ -85,12 +85,21 @@ jobs:
85
85
python ./deviceadvisor/script/DATestRun.py
86
86
87
87
osx :
88
- runs-on : macos-13
88
+ runs-on : ${{ matrix.runner }}
89
+ strategy :
90
+ matrix :
91
+ runner :
92
+ - macos-13
93
+ - macos-latest
89
94
permissions :
90
95
id-token : write # This is required for requesting the JWT
91
96
steps :
92
97
- name : Install boto3
98
+ # Starting from macos14, boto3 is no longer available in macos homebrew python https://github.com/Homebrew/homebrew-core/issues/157500
99
+ # use virtual env to work around.
93
100
run : |
101
+ python3 -m venv .venv
102
+ source .venv/bin/activate
94
103
python3 -m pip install boto3
95
104
- name : configure AWS credentials (containers)
96
105
uses : aws-actions/configure-aws-credentials@v2
@@ -99,26 +108,26 @@ jobs:
99
108
aws-region : ${{ env.AWS_DEFAULT_REGION }}
100
109
- name : Build ${{ env.PACKAGE_NAME }}
101
110
run : |
111
+ source .venv/bin/activate
102
112
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
103
113
chmod a+x builder
104
114
./builder build -p ${{ env.PACKAGE_NAME }}
105
- - name : Running samples in CI setup
106
- run : |
107
- python3 -m pip install boto3
108
115
- name : configure AWS credentials (PubSub)
109
116
uses : aws-actions/configure-aws-credentials@v2
110
117
with :
111
118
role-to-assume : ${{ env.CI_PUBSUB_ROLE }}
112
119
aws-region : ${{ env.AWS_DEFAULT_REGION }}
113
120
- name : run PubSub sample
114
121
run : |
122
+ source .venv/bin/activate
115
123
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pubsub_cfg.json
116
124
- name : run PKCS12 sample
117
125
run : |
118
126
cert=$(aws secretsmanager get-secret-value --region us-east-1 --secret-id "ci/PubSub/cert" --query "SecretString" | cut -f2 -d":" | cut -f2 -d\") && echo -e "$cert" > /tmp/certificate.pem
119
127
key=$(aws secretsmanager get-secret-value --region us-east-1 --secret-id "ci/PubSub/key" --query "SecretString" | cut -f2 -d":" | cut -f2 -d\") && echo -e "$key" > /tmp/privatekey.pem
120
128
pkcs12_password=$(aws secretsmanager get-secret-value --region us-east-1 --secret-id "ci/PubSub/key_pkcs12_password" --query "SecretString" | cut -f2 -d":" | cut -f2 -d\")
121
129
openssl pkcs12 -export -in /tmp/certificate.pem -inkey /tmp/privatekey.pem -out ./pkcs12-key.p12 -name PubSub_Thing_Alias -password pass:$pkcs12_password
130
+ source .venv/bin/activate
122
131
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pkcs12_connect_cfg.json
123
132
- name : configure AWS credentials (MQTT5 samples)
124
133
uses : aws-actions/configure-aws-credentials@v2
@@ -127,6 +136,7 @@ jobs:
127
136
aws-region : ${{ env.AWS_DEFAULT_REGION }}
128
137
- name : run MQTT5 PubSub sample
129
138
run : |
139
+ source .venv/bin/activate
130
140
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_mqtt5_pubsub_cfg.json
131
141
- name : configure AWS credentials (Device Advisor)
132
142
uses : aws-actions/configure-aws-credentials@v2
@@ -135,6 +145,7 @@ jobs:
135
145
aws-region : ${{ env.AWS_DEFAULT_REGION }}
136
146
- name : run DeviceAdvisor
137
147
run : |
148
+ source .venv/bin/activate
138
149
cd ./aws-iot-device-sdk-python-v2
139
150
python3 ./deviceadvisor/script/DATestRun.py
140
151
0 commit comments