Skip to content

Commit 39e497d

Browse files
sfodxiazhvera
andauthored
Fix macos CI job (#721)
Co-authored-by: Vera Xia <[email protected]>
1 parent 1b92c84 commit 39e497d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/ci.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,12 @@ jobs:
325325
python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON
326326
327327
osx:
328-
runs-on: macos-latest
328+
runs-on: ${{ matrix.runner }}
329+
strategy:
330+
matrix:
331+
runner:
332+
- macos-13
333+
- macos-latest
329334
permissions:
330335
id-token: write # This is required for requesting the JWT
331336
security-events: write # This is required for pkcs12 sample to sign the key
@@ -337,6 +342,8 @@ jobs:
337342
./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream
338343
- name: Running samples in CI setup
339344
run: |
345+
python3 -m venv .venv
346+
source .venv/bin/activate
340347
python3 -m pip install boto3
341348
- name: configure AWS credentials (PubSub)
342349
uses: aws-actions/configure-aws-credentials@v2
@@ -345,6 +352,7 @@ jobs:
345352
aws-region: ${{ env.AWS_DEFAULT_REGION }}
346353
- name: run MQTT3 PubSub sample
347354
run: |
355+
source .venv/bin/activate
348356
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pubsub_cfg.json
349357
# - name: run PKCS12 sample
350358
# run: |
@@ -370,6 +378,7 @@ jobs:
370378
aws-region: ${{ env.AWS_DEFAULT_REGION }}
371379
- name: run MQTT5 PubSub sample
372380
run: |
381+
source .venv/bin/activate
373382
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_mqtt5_pubsub_cfg.json
374383
- name: configure AWS credentials (Device Advisor)
375384
uses: aws-actions/configure-aws-credentials@v2
@@ -378,6 +387,7 @@ jobs:
378387
aws-region: ${{ env.AWS_DEFAULT_REGION }}
379388
- name: run DeviceAdvisor
380389
run: |
390+
source .venv/bin/activate
381391
cd ./aws-iot-device-sdk-cpp-v2
382392
python3 ./deviceadvisor/script/DATestRun.py
383393
# Not strictly needed, but allows us to run Device Advisor and PubSub on Linux without needing to run all samples

0 commit comments

Comments
 (0)