@@ -85,12 +85,21 @@ jobs:
8585 python ./deviceadvisor/script/DATestRun.py
8686
8787 osx :
88- runs-on : macos-13
88+ runs-on : ${{ matrix.runner }}
89+ strategy :
90+ matrix :
91+ runner :
92+ - macos-13
93+ - macos-latest
8994 permissions :
9095 id-token : write # This is required for requesting the JWT
9196 steps :
9297 - 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.
93100 run : |
101+ python3 -m venv .venv
102+ source .venv/bin/activate
94103 python3 -m pip install boto3
95104 - name : configure AWS credentials (containers)
96105 uses : aws-actions/configure-aws-credentials@v2
@@ -99,26 +108,26 @@ jobs:
99108 aws-region : ${{ env.AWS_DEFAULT_REGION }}
100109 - name : Build ${{ env.PACKAGE_NAME }}
101110 run : |
111+ source .venv/bin/activate
102112 python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
103113 chmod a+x builder
104114 ./builder build -p ${{ env.PACKAGE_NAME }}
105- - name : Running samples in CI setup
106- run : |
107- python3 -m pip install boto3
108115 - name : configure AWS credentials (PubSub)
109116 uses : aws-actions/configure-aws-credentials@v2
110117 with :
111118 role-to-assume : ${{ env.CI_PUBSUB_ROLE }}
112119 aws-region : ${{ env.AWS_DEFAULT_REGION }}
113120 - name : run PubSub sample
114121 run : |
122+ source .venv/bin/activate
115123 python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pubsub_cfg.json
116124 - name : run PKCS12 sample
117125 run : |
118126 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
119127 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
120128 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\")
121129 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
122131 python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pkcs12_connect_cfg.json
123132 - name : configure AWS credentials (MQTT5 samples)
124133 uses : aws-actions/configure-aws-credentials@v2
@@ -127,6 +136,7 @@ jobs:
127136 aws-region : ${{ env.AWS_DEFAULT_REGION }}
128137 - name : run MQTT5 PubSub sample
129138 run : |
139+ source .venv/bin/activate
130140 python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_mqtt5_pubsub_cfg.json
131141 - name : configure AWS credentials (Device Advisor)
132142 uses : aws-actions/configure-aws-credentials@v2
@@ -135,6 +145,7 @@ jobs:
135145 aws-region : ${{ env.AWS_DEFAULT_REGION }}
136146 - name : run DeviceAdvisor
137147 run : |
148+ source .venv/bin/activate
138149 cd ./aws-iot-device-sdk-python-v2
139150 python3 ./deviceadvisor/script/DATestRun.py
140151
0 commit comments