From 39e497de16940ad0616e4c46785993072a336031 Mon Sep 17 00:00:00 2001 From: Igor Abdrakhimov Date: Wed, 29 May 2024 16:20:18 -0700 Subject: [PATCH] Fix macos CI job (#721) Co-authored-by: Vera Xia --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42bb8ac00..8ca3c74fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -325,7 +325,12 @@ jobs: python builder.pyz build -p ${{ env.PACKAGE_NAME }} --cmake-extra=-DBUILD_SHARED_LIBS=ON osx: - runs-on: macos-latest + runs-on: ${{ matrix.runner }} + strategy: + matrix: + runner: + - macos-13 + - macos-latest permissions: id-token: write # This is required for requesting the JWT security-events: write # This is required for pkcs12 sample to sign the key @@ -337,6 +342,8 @@ jobs: ./builder build -p ${{ env.PACKAGE_NAME }} --spec=downstream - name: Running samples in CI setup run: | + python3 -m venv .venv + source .venv/bin/activate python3 -m pip install boto3 - name: configure AWS credentials (PubSub) uses: aws-actions/configure-aws-credentials@v2 @@ -345,6 +352,7 @@ jobs: aws-region: ${{ env.AWS_DEFAULT_REGION }} - name: run MQTT3 PubSub sample run: | + source .venv/bin/activate python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pubsub_cfg.json # - name: run PKCS12 sample # run: | @@ -370,6 +378,7 @@ jobs: aws-region: ${{ env.AWS_DEFAULT_REGION }} - name: run MQTT5 PubSub sample run: | + source .venv/bin/activate python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_mqtt5_pubsub_cfg.json - name: configure AWS credentials (Device Advisor) uses: aws-actions/configure-aws-credentials@v2 @@ -378,6 +387,7 @@ jobs: aws-region: ${{ env.AWS_DEFAULT_REGION }} - name: run DeviceAdvisor run: | + source .venv/bin/activate cd ./aws-iot-device-sdk-cpp-v2 python3 ./deviceadvisor/script/DATestRun.py # Not strictly needed, but allows us to run Device Advisor and PubSub on Linux without needing to run all samples