Skip to content

Commit

Permalink
move venv to home
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed May 29, 2024
1 parent eeb1ed1 commit aa0dea9
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ jobs:
# Starting from macos14, boto3 not longer available in homebrew python no longer https://github.com/Homebrew/homebrew-core/issues/157500
# use virtual env to work around it.
run: |
python3 -m venv .venv
source .venv/bin/activate
python3 -m venv /.venv
source /.venv/bin/activate
python3 -m pip install boto3
- name: configure AWS credentials (containers)
uses: aws-actions/configure-aws-credentials@v2
Expand All @@ -108,6 +108,7 @@ jobs:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Build ${{ env.PACKAGE_NAME }}
run: |
source /.venv/bin/activate
python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')"
chmod a+x builder
./builder build -p ${{ env.PACKAGE_NAME }}
Expand All @@ -118,15 +119,15 @@ jobs:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run PubSub sample
run: |
source .venv/bin/activate
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: |
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
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
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\")
openssl pkcs12 -export -in /tmp/certificate.pem -inkey /tmp/privatekey.pem -out ./pkcs12-key.p12 -name PubSub_Thing_Alias -password pass:$pkcs12_password
source .venv/bin/activate
source /.venv/bin/activate
python3 ${{ env.CI_UTILS_FOLDER }}/run_sample_ci.py --file ${{ env.CI_SAMPLES_CFG_FOLDER }}/ci_run_pkcs12_connect_cfg.json
- name: configure AWS credentials (MQTT5 samples)
uses: aws-actions/configure-aws-credentials@v2
Expand All @@ -135,7 +136,7 @@ jobs:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run MQTT5 PubSub sample
run: |
source .venv/bin/activate
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
Expand All @@ -144,7 +145,7 @@ jobs:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: run DeviceAdvisor
run: |
source .venv/bin/activate
source /.venv/bin/activate
cd ./aws-iot-device-sdk-python-v2
python3 ./deviceadvisor/script/DATestRun.py
Expand Down

0 comments on commit aa0dea9

Please sign in to comment.