From f42406b5a521ee0d2954f7df4848a6859c0a2d28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFs=20Postula?= Date: Thu, 29 Aug 2024 07:12:58 +0200 Subject: [PATCH 01/12] feat: create rust image for rust 1.80 --- .github/workflows/ci_runner_set_images.yaml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci_runner_set_images.yaml b/.github/workflows/ci_runner_set_images.yaml index 848f3f0..cacbeeb 100644 --- a/.github/workflows/ci_runner_set_images.yaml +++ b/.github/workflows/ci_runner_set_images.yaml @@ -14,14 +14,6 @@ jobs: strategy: matrix: image: - - name: ghcr.io/foresightminingsoftwarecorporation/rust-test:rust-1.74 - context: docker/rust-tests - args: | - RUST_VERSION=1.74 - - name: ghcr.io/foresightminingsoftwarecorporation/rust-test:rust-1.75 - context: docker/rust-tests - args: | - RUST_VERSION=1.75 - name: ghcr.io/foresightminingsoftwarecorporation/rust-test:rust-1.76 context: docker/rust-tests args: | @@ -30,10 +22,14 @@ jobs: context: docker/rust-tests args: | RUST_VERSION=1.77 + - name: ghcr.io/foresightminingsoftwarecorporation/rust-test:rust-1.80 + context: docker/rust-tests + args: | + RUST_VERSION=1.80 - name: ghcr.io/foresightminingsoftwarecorporation/ci:latest context: docker/ci args: | - RUST_VERSION=1.77 + RUST_VERSION=1.80 steps: - name: "Checkout" uses: actions/checkout@v4 @@ -65,14 +61,12 @@ jobs: strategy: matrix: image: - - name: ghcr.io/foresightminingsoftwarecorporation/rust-test:rust-1.74 - scaleset: rust-1-74-scale-set - - name: ghcr.io/foresightminingsoftwarecorporation/rust-test:rust-1.75 - scaleset: rust-1-75-scale-set - name: ghcr.io/foresightminingsoftwarecorporation/rust-test:rust-1.76 scaleset: rust-1-76-scale-set - name: ghcr.io/foresightminingsoftwarecorporation/rust-test:rust-1.77 scaleset: rust-1-77-scale-set + - name: ghcr.io/foresightminingsoftwarecorporation/rust-test:rust-1.80 + scaleset: rust-1-80-scale-set - name: ghcr.io/foresightminingsoftwarecorporation/ci:latest scaleset: ci-scale-set steps: From 4d3580c9639f4e7140c0bf6bfa641cea8487f722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFs=20Postula?= Date: Wed, 4 Sep 2024 09:14:02 +0200 Subject: [PATCH 02/12] feat: login to cos --- .../actions/login-private-registry/action.yml | 17 ++++++++++++++++- .github/workflows/docker_publish.yml | 5 ++++- .github/workflows/npm_napi_publish.yml | 10 ++++++++-- .github/workflows/rust-update-dependencies.yml | 5 ++++- .github/workflows/rust_binary_publish.yml | 5 ++++- .github/workflows/rust_registry_publish.yml | 5 ++++- .github/workflows/rust_test.yml | 5 ++++- 7 files changed, 44 insertions(+), 8 deletions(-) diff --git a/.github/actions/login-private-registry/action.yml b/.github/actions/login-private-registry/action.yml index f421bdb..bb3daa8 100644 --- a/.github/actions/login-private-registry/action.yml +++ b/.github/actions/login-private-registry/action.yml @@ -15,6 +15,15 @@ inputs: additional_private_keys: default: "" description: "Additional private keys to add to the ssh-agent" + cos_username: + default: "" + description: "Username to connect to cos" + cos_password: + default: "" + description: "Password to connect to cos" + cos_tenant: + default: "" + description: "Tenant to connect to cos" host: default: "" description: "DEPRECATED" @@ -56,10 +65,16 @@ runs: echo " insteadOf = https://github.com/orica-digital" >> $HOME/.gitconfig echo '[url "ssh://git@github.com/orica-digital"]' >> $HOME/.gitconfig echo " insteadOf = https://git@github.com/orica-digital" >> $HOME/.gitconfig - - name: Login to private registry + - name: Login to shipyard private registry shell: bash run: cargo login --registry ${{ inputs.name }} ${{ inputs.token }} + - name: Login to orica cosmos private registry + shell: bash + if: inputs.cos_username != '' && inputs.cos_password != '' && inputs.cos_tenant != '' + run: + az login --service-principal --username ${{ inputs.cos_username }} --password ${{ inputs.cos_password }} --tenant ${{ inputs.cos_tenant }} + az account get-access-token --query "join(' ', ['Bearer', accessToken])" --output tsv | cargo login --registry cos - name: Login to our private npm registry uses: actions/setup-node@v4 with: diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index e78054d..04822f8 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -86,12 +86,15 @@ jobs: with: toolchain: ${{ inputs.toolchain }} - - uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v2 + - uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v3.2.0 with: private_key: ${{ secrets.CARGO_PRIVATE_REGISTRY_SSH_PRIVATE_KEY }} host: ${{ secrets.CARGO_PRIVATE_REGISTRY_HOST }} name: ${{ secrets.CARGO_PRIVATE_REGISTRY_NAME }} token: ${{ secrets.CARGO_PRIVATE_REGISTRY_TOKEN }} + cos_username: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_USERNAME }} + cos_password: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_PASSWORD }} + cos_tenant: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_TENANT }} additional_private_keys: | ${{ secrets.OREPROLIB_SSH_PRIVATE_KEY }} ${{ secrets.SPARKL_BLAST_SSH_PRIVATE_KEY }} diff --git a/.github/workflows/npm_napi_publish.yml b/.github/workflows/npm_napi_publish.yml index f366825..0167bf4 100644 --- a/.github/workflows/npm_napi_publish.yml +++ b/.github/workflows/npm_napi_publish.yml @@ -67,12 +67,15 @@ jobs: - name: Git checkout uses: actions/checkout@v4 - - uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v2 + - uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v3.2.0 with: private_key: ${{ secrets.CARGO_PRIVATE_REGISTRY_SSH_PRIVATE_KEY }} host: ${{ secrets.CARGO_PRIVATE_REGISTRY_HOST }} name: ${{ secrets.CARGO_PRIVATE_REGISTRY_NAME }} token: ${{ secrets.CARGO_PRIVATE_REGISTRY_TOKEN }} + cos_username: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_USERNAME }} + cos_password: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_PASSWORD }} + cos_tenant: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_TENANT }} - name: Build rust package uses: ForesightMiningSoftwareCorporation/github/.github/actions/build-napi-artifact@v3.0.0 @@ -129,12 +132,15 @@ jobs: run: yarn artifacts working-directory: ${{ inputs.working_directory }} - - uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v2 + - uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v3.2.0 with: private_key: ${{ secrets.CARGO_PRIVATE_REGISTRY_SSH_PRIVATE_KEY }} host: ${{ secrets.CARGO_PRIVATE_REGISTRY_HOST }} name: ${{ secrets.CARGO_PRIVATE_REGISTRY_NAME }} token: ${{ secrets.CARGO_PRIVATE_REGISTRY_TOKEN }} + cos_username: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_USERNAME }} + cos_password: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_PASSWORD }} + cos_tenant: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_TENANT }} - name: Publish id: publish diff --git a/.github/workflows/rust-update-dependencies.yml b/.github/workflows/rust-update-dependencies.yml index 8e0af5d..24e2e28 100644 --- a/.github/workflows/rust-update-dependencies.yml +++ b/.github/workflows/rust-update-dependencies.yml @@ -37,13 +37,16 @@ jobs: with: app_id: ${{ secrets.UPDATECLIBOT_APP_ID }} private_key: ${{ secrets.UPDATECLIBOT_APP_PRIVKEY }} - - uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v1 + - uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v3.2.0 if: steps.check_exists.outputs.exists != 'true' with: private_key: ${{ secrets.CARGO_PRIVATE_REGISTRY_SSH_PRIVATE_KEY }} host: ${{ secrets.CARGO_PRIVATE_REGISTRY_HOST }} name: ${{ secrets.CARGO_PRIVATE_REGISTRY_NAME }} token: ${{ secrets.CARGO_PRIVATE_REGISTRY_TOKEN }} + cos_username: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_USERNAME }} + cos_password: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_PASSWORD }} + cos_tenant: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_TENANT }} - name: Run UpdateCli Autodiscovery shell: bash run: | diff --git a/.github/workflows/rust_binary_publish.yml b/.github/workflows/rust_binary_publish.yml index 5fecd2b..91b9102 100644 --- a/.github/workflows/rust_binary_publish.yml +++ b/.github/workflows/rust_binary_publish.yml @@ -79,12 +79,15 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ inputs.toolchain }} - - uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v1 + - uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v3.2.0 with: private_key: ${{ secrets.CARGO_PRIVATE_REGISTRY_SSH_PRIVATE_KEY }} host: ${{ secrets.CARGO_PRIVATE_REGISTRY_HOST }} name: ${{ secrets.CARGO_PRIVATE_REGISTRY_NAME }} token: ${{ secrets.CARGO_PRIVATE_REGISTRY_TOKEN }} + cos_username: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_USERNAME }} + cos_password: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_PASSWORD }} + cos_tenant: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_TENANT }} additional_private_keys: | ${{ secrets.FSE_SSH_PRIVATE_KEY }} ${{ secrets.BEVY_CLIPMAP_SSH_PRIVATE_KEY }} diff --git a/.github/workflows/rust_registry_publish.yml b/.github/workflows/rust_registry_publish.yml index 393b4b3..c7bd100 100644 --- a/.github/workflows/rust_registry_publish.yml +++ b/.github/workflows/rust_registry_publish.yml @@ -74,13 +74,16 @@ jobs: shell: bash run: | cargo login ${{ secrets.CARGO_PUBLIC_REGISTRY_TOKEN }} - - uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v1 + - uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v3.2.0 if: inputs.public_release != 'true' with: private_key: ${{ secrets.CARGO_PRIVATE_REGISTRY_SSH_PRIVATE_KEY }} host: ${{ secrets.CARGO_PRIVATE_REGISTRY_HOST }} name: ${{ secrets.CARGO_PRIVATE_REGISTRY_NAME }} token: ${{ secrets.CARGO_PRIVATE_REGISTRY_TOKEN }} + cos_username: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_USERNAME }} + cos_password: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_PASSWORD }} + cos_tenant: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_TENANT }} additional_private_keys: | ${{ secrets.FSE_SSH_PRIVATE_KEY }} ${{ secrets.VOLUMESIGHT_SSH_PRIVATE_KEY }} diff --git a/.github/workflows/rust_test.yml b/.github/workflows/rust_test.yml index 82cbe1b..a16356f 100644 --- a/.github/workflows/rust_test.yml +++ b/.github/workflows/rust_test.yml @@ -162,12 +162,15 @@ jobs: rustup set auto-self-update disable - name: Checkout uses: actions/checkout@v4 - - uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v1 + - uses: ForesightMiningSoftwareCorporation/github/.github/actions/login-private-registry@v3.2.0 with: private_key: ${{ secrets.CARGO_PRIVATE_REGISTRY_SSH_PRIVATE_KEY }} host: ${{ secrets.CARGO_PRIVATE_REGISTRY_HOST }} name: ${{ secrets.CARGO_PRIVATE_REGISTRY_NAME }} token: ${{ secrets.CARGO_PRIVATE_REGISTRY_TOKEN }} + cos_username: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_USERNAME }} + cos_password: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_PASSWORD }} + cos_tenant: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_TENANT }} additional_private_keys: | ${{ secrets.FSE_SSH_PRIVATE_KEY }} ${{ secrets.BEVY_CLIPMAP_SSH_PRIVATE_KEY }} From c795d4988a2bcff462d3c3aded127ee335d68225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFs=20Postula?= Date: Wed, 4 Sep 2024 09:19:20 +0200 Subject: [PATCH 03/12] feat: add confi of build-workflow-version --- .github/workflows/update_release_workflows.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_release_workflows.yml b/.github/workflows/update_release_workflows.yml index 56baa10..1941f20 100644 --- a/.github/workflows/update_release_workflows.yml +++ b/.github/workflows/update_release_workflows.yml @@ -31,7 +31,7 @@ jobs: else template_option="" fi - fslabscli generate-release-workflow --test-publish-required-disabled --fslabscli-version ${{ vars.FSLABSCLI_VERSION }} ${template_option} + fslabscli generate-release-workflow --test-publish-required-disabled --fslabscli-version ${{ vars.FSLABSCLI_VERSION }} --build-workflow-version ${{ vars.BUILD_WORKFLOW_VERSION }} ${template_option} - id: generate_wix_files name: Generate release wix files shell: bash From 72294929de7f7d5a78ad7a0272b0f59e089ee182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFs=20Postula?= Date: Wed, 4 Sep 2024 14:14:28 +0200 Subject: [PATCH 04/12] feat: ensure az is available --- .../actions/login-private-registry/action.yml | 18 +++++++++++++----- .github/workflows/docker_publish.yml | 1 + .github/workflows/npm_napi_publish.yml | 1 + .github/workflows/rust-update-dependencies.yml | 1 + .github/workflows/rust_binary_publish.yml | 1 + .github/workflows/rust_registry_publish.yml | 1 + .github/workflows/rust_test.yml | 1 + 7 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/actions/login-private-registry/action.yml b/.github/actions/login-private-registry/action.yml index bb3daa8..25d1ea9 100644 --- a/.github/actions/login-private-registry/action.yml +++ b/.github/actions/login-private-registry/action.yml @@ -24,6 +24,9 @@ inputs: cos_tenant: default: "" description: "Tenant to connect to cos" + cos_subscription: + default: "" + description: "Subscription to connect to cos" host: default: "" description: "DEPRECATED" @@ -69,12 +72,17 @@ runs: shell: bash run: cargo login --registry ${{ inputs.name }} ${{ inputs.token }} + - name: Login to azure for orica cosmos private registry + if: inputs.cos_username != '' && inputs.cos_password != '' && inputs.cos_tenant != '' && inputs.cos_subscription != '' + uses: azure/login@v2 + with: + creds: '{"clientId": "${{ inputs.cos_username }}", "clientSecret": "${{ inputs.cos_password }}", "tenantId": "${{ inputs.cos_tenant }}", "subscriptionId": "${{ inputs.cos_subscription }}"}' - name: Login to orica cosmos private registry - shell: bash - if: inputs.cos_username != '' && inputs.cos_password != '' && inputs.cos_tenant != '' - run: - az login --service-principal --username ${{ inputs.cos_username }} --password ${{ inputs.cos_password }} --tenant ${{ inputs.cos_tenant }} - az account get-access-token --query "join(' ', ['Bearer', accessToken])" --output tsv | cargo login --registry cos + uses: azure/cli@v2 + if: inputs.cos_username != '' && inputs.cos_password != '' && inputs.cos_tenant != '' && inputs.cos_subscription != '' + with: + inlineScript: | + az account get-access-token --query "join(' ', ['Bearer', accessToken])" --output tsv | cargo login --registry cos - name: Login to our private npm registry uses: actions/setup-node@v4 with: diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 04822f8..07c61ea 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -95,6 +95,7 @@ jobs: cos_username: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_USERNAME }} cos_password: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_PASSWORD }} cos_tenant: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_TENANT }} + cos_subscription: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_SUBSCRIPTION }} additional_private_keys: | ${{ secrets.OREPROLIB_SSH_PRIVATE_KEY }} ${{ secrets.SPARKL_BLAST_SSH_PRIVATE_KEY }} diff --git a/.github/workflows/npm_napi_publish.yml b/.github/workflows/npm_napi_publish.yml index 0167bf4..6d3e999 100644 --- a/.github/workflows/npm_napi_publish.yml +++ b/.github/workflows/npm_napi_publish.yml @@ -76,6 +76,7 @@ jobs: cos_username: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_USERNAME }} cos_password: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_PASSWORD }} cos_tenant: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_TENANT }} + cos_subscription: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_SUBSCRIPTION }} - name: Build rust package uses: ForesightMiningSoftwareCorporation/github/.github/actions/build-napi-artifact@v3.0.0 diff --git a/.github/workflows/rust-update-dependencies.yml b/.github/workflows/rust-update-dependencies.yml index 24e2e28..9185f82 100644 --- a/.github/workflows/rust-update-dependencies.yml +++ b/.github/workflows/rust-update-dependencies.yml @@ -47,6 +47,7 @@ jobs: cos_username: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_USERNAME }} cos_password: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_PASSWORD }} cos_tenant: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_TENANT }} + cos_subscription: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_SUBSCRIPTION }} - name: Run UpdateCli Autodiscovery shell: bash run: | diff --git a/.github/workflows/rust_binary_publish.yml b/.github/workflows/rust_binary_publish.yml index 91b9102..50316a6 100644 --- a/.github/workflows/rust_binary_publish.yml +++ b/.github/workflows/rust_binary_publish.yml @@ -88,6 +88,7 @@ jobs: cos_username: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_USERNAME }} cos_password: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_PASSWORD }} cos_tenant: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_TENANT }} + cos_subscription: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_SUBSCRIPTION }} additional_private_keys: | ${{ secrets.FSE_SSH_PRIVATE_KEY }} ${{ secrets.BEVY_CLIPMAP_SSH_PRIVATE_KEY }} diff --git a/.github/workflows/rust_registry_publish.yml b/.github/workflows/rust_registry_publish.yml index c7bd100..d3692b4 100644 --- a/.github/workflows/rust_registry_publish.yml +++ b/.github/workflows/rust_registry_publish.yml @@ -84,6 +84,7 @@ jobs: cos_username: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_USERNAME }} cos_password: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_PASSWORD }} cos_tenant: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_TENANT }} + cos_subscription: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_SUBSCRIPTION }} additional_private_keys: | ${{ secrets.FSE_SSH_PRIVATE_KEY }} ${{ secrets.VOLUMESIGHT_SSH_PRIVATE_KEY }} diff --git a/.github/workflows/rust_test.yml b/.github/workflows/rust_test.yml index a16356f..5a20005 100644 --- a/.github/workflows/rust_test.yml +++ b/.github/workflows/rust_test.yml @@ -171,6 +171,7 @@ jobs: cos_username: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_USERNAME }} cos_password: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_PASSWORD }} cos_tenant: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_TENANT }} + cos_subscription: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_SUBSCRIPTION }} additional_private_keys: | ${{ secrets.FSE_SSH_PRIVATE_KEY }} ${{ secrets.BEVY_CLIPMAP_SSH_PRIVATE_KEY }} From b9de846c68e27492824fc4a55a622f73b1140159 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFs=20Postula?= Date: Thu, 5 Sep 2024 11:41:54 +0200 Subject: [PATCH 05/12] feat: install azure-cli in our test runner --- .github/actions/login-private-registry/action.yml | 8 ++++---- docker/rust-tests/Dockerfile | 15 ++++++++++++++- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/actions/login-private-registry/action.yml b/.github/actions/login-private-registry/action.yml index 25d1ea9..17d130f 100644 --- a/.github/actions/login-private-registry/action.yml +++ b/.github/actions/login-private-registry/action.yml @@ -78,11 +78,11 @@ runs: with: creds: '{"clientId": "${{ inputs.cos_username }}", "clientSecret": "${{ inputs.cos_password }}", "tenantId": "${{ inputs.cos_tenant }}", "subscriptionId": "${{ inputs.cos_subscription }}"}' - name: Login to orica cosmos private registry - uses: azure/cli@v2 + shell: bash if: inputs.cos_username != '' && inputs.cos_password != '' && inputs.cos_tenant != '' && inputs.cos_subscription != '' - with: - inlineScript: | - az account get-access-token --query "join(' ', ['Bearer', accessToken])" --output tsv | cargo login --registry cos + run: | + az login --service-principal --username ${{ inputs.cos_username }} --password ${{ inputs.cos_password }} --tenant ${{ inputs.cos_tenant }} + az account get-access-token --query "join(' ', ['Bearer', accessToken])" --output tsv | cargo login --registry cos - name: Login to our private npm registry uses: actions/setup-node@v4 with: diff --git a/docker/rust-tests/Dockerfile b/docker/rust-tests/Dockerfile index 4ae7e98..c70801f 100644 --- a/docker/rust-tests/Dockerfile +++ b/docker/rust-tests/Dockerfile @@ -3,7 +3,17 @@ FROM ghcr.io/actions/actions-runner:$GITHUB_RUNNER_VERSION ARG RUST_VERSION=1.77 ARG SCCACHE_VERSION=0.7.7 - +RUN sudo apt-get update && sudo apt-get install -y \ + apt-transport-https ca-certificates curl gnupg lsb-release +RUN sudo mkdir -p /etc/apt/keyrings +RUN curl -sLS https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null +RUN sudo chmod go+r /etc/apt/keyrings/microsoft.gpg +RUN AZ_DIST=$(lsb_release -cs) echo 'Types: deb\n\ +URIs: https://packages.microsoft.com/repos/azure-cli/\n\ +Suites: jammy\n\ +Components: main\n\ +Architectures: amd64\n\ +Signed-by: /etc/apt/keyrings/microsoft.gpg' | sudo tee /etc/apt/sources.list.d/azure-cli.sources RUN sudo apt-get update && sudo apt-get install -y \ software-properties-common \ build-essential \ @@ -52,6 +62,7 @@ RUN sudo apt-get update && sudo apt-get install -y \ librust-atk-dev \ jq \ libclang-dev \ + azure-cli \ clang # Install Node v20 and AWS CDK @@ -79,6 +90,8 @@ RUN DPKG_ARCH="$(dpkg --print-architecture)" \ && YQ_DOWNLOAD_URL=$(curl -sL -H "Accept: application/vnd.github+json" https://api.github.com/repos/mikefarah/yq/releases/latest | jq ".assets[] | select(.name == \"yq_linux_${DPKG_ARCH}.tar.gz\")" | jq -r '.browser_download_url') \ && ( curl -s ${YQ_DOWNLOAD_URL} -L -o /tmp/yq.tar.gz && tar -xzf /tmp/yq.tar.gz -C /tmp && sudo mv /tmp/yq_linux_${DPKG_ARCH} /usr/local/bin/yq) +# Install + RUN rustup component add clippy rustfmt RUN cargo install --locked cargo-deny RUN cargo install cargo-machete From 92926172589da682624f783c4a0e572c1ad507ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFs=20Postula?= Date: Mon, 9 Sep 2024 18:21:02 +0200 Subject: [PATCH 06/12] feat: make sure rustup is sync --- docker/rust-tests/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/rust-tests/Dockerfile b/docker/rust-tests/Dockerfile index c70801f..192bfcd 100644 --- a/docker/rust-tests/Dockerfile +++ b/docker/rust-tests/Dockerfile @@ -91,7 +91,7 @@ RUN DPKG_ARCH="$(dpkg --print-architecture)" \ && ( curl -s ${YQ_DOWNLOAD_URL} -L -o /tmp/yq.tar.gz && tar -xzf /tmp/yq.tar.gz -C /tmp && sudo mv /tmp/yq_linux_${DPKG_ARCH} /usr/local/bin/yq) # Install - +RUN rustup default ${RUST_VERSION} RUN rustup component add clippy rustfmt RUN cargo install --locked cargo-deny RUN cargo install cargo-machete From 0dd9d5e7d6277eb74056358bd59c43c82b67655a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFs=20Postula?= Date: Tue, 10 Sep 2024 10:08:30 +0200 Subject: [PATCH 07/12] feat: migrate deny to v2 --- deny.toml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/deny.toml b/deny.toml index 4e7fefa..a6c5096 100644 --- a/deny.toml +++ b/deny.toml @@ -1,8 +1,5 @@ [licenses] -allow-osi-fsf-free = "neither" -copyleft = "warn" -default = "deny" -unlicensed = "allow" +version = 2 allow = [ "Apache-2.0", "Apache-2.0 WITH LLVM-exception", From 1cf260e2f979c5aec53f716f1c8bc7509a4b1c38 Mon Sep 17 00:00:00 2001 From: nathan-tarr-orica Date: Fri, 13 Sep 2024 17:07:39 +1000 Subject: [PATCH 08/12] chore: Update npm_napi_publish.yml to unblock napi build Add libasound2-dev --- .github/workflows/npm_napi_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm_napi_publish.yml b/.github/workflows/npm_napi_publish.yml index 6d3e999..44ea25b 100644 --- a/.github/workflows/npm_napi_publish.yml +++ b/.github/workflows/npm_napi_publish.yml @@ -52,7 +52,7 @@ jobs: arch: x86_64-unknown-linux-gnu ext: "" docker_image: "" - additional_packages: "librust-atk-dev libgtk-3-dev libglib2.0-dev" + additional_packages: "librust-atk-dev libgtk-3-dev libglib2.0-dev libasound2-dev" - name: windows-latest-16-cores-custom arch: x86_64-pc-windows-msvc ext: .exe From 08ae191f8c7b07cadc7624fa46888a971a00c7bc Mon Sep 17 00:00:00 2001 From: nathan-tarr-orica Date: Fri, 13 Sep 2024 17:40:23 +1000 Subject: [PATCH 09/12] chore: Update npm_napi_publish.yml to unblock napi build Replace libasound2-dev with alsa-lib-dev --- .github/workflows/npm_napi_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm_napi_publish.yml b/.github/workflows/npm_napi_publish.yml index 44ea25b..44e9614 100644 --- a/.github/workflows/npm_napi_publish.yml +++ b/.github/workflows/npm_napi_publish.yml @@ -52,7 +52,7 @@ jobs: arch: x86_64-unknown-linux-gnu ext: "" docker_image: "" - additional_packages: "librust-atk-dev libgtk-3-dev libglib2.0-dev libasound2-dev" + additional_packages: "librust-atk-dev libgtk-3-dev libglib2.0-dev alsa-lib-dev" - name: windows-latest-16-cores-custom arch: x86_64-pc-windows-msvc ext: .exe From ead4e34ba0fdf8954690206559325aa5abb26a61 Mon Sep 17 00:00:00 2001 From: nathan-tarr-orica Date: Fri, 13 Sep 2024 17:42:08 +1000 Subject: [PATCH 10/12] Update Dockerfile replace libasound2-dev with alsa-lib-dev --- docker/napi/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/napi/Dockerfile b/docker/napi/Dockerfile index dd1c210..687a966 100644 --- a/docker/napi/Dockerfile +++ b/docker/napi/Dockerfile @@ -6,7 +6,7 @@ ENV PATH="/aarch64-linux-musl-cross/bin:/usr/local/cargo/bin/rustup:/root/.cargo CXX="clang++" \ GN_EXE=gn -RUN apk add --update --no-cache nodejs yarn bash clang wget cmake git openssh make perl pkgconfig openssl-dev curl gcc musl-dev linux-headers libudev-dev libasound2-dev libxcb-composite0-dev libgtk-3-dev +RUN apk add --update --no-cache nodejs yarn bash clang wget cmake git openssh make perl pkgconfig openssl-dev curl gcc musl-dev linux-headers libudev-dev alsa-lib-dev libxcb-composite0-dev libgtk-3-dev WORKDIR /tmp From b4e92679575834e5acf28b5a8c257b25a225221b Mon Sep 17 00:00:00 2001 From: nathan-tarr-orica Date: Fri, 13 Sep 2024 18:12:01 +1000 Subject: [PATCH 11/12] Update .github/workflows/npm_napi_publish.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Loïs Postula --- .github/workflows/npm_napi_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/npm_napi_publish.yml b/.github/workflows/npm_napi_publish.yml index 44e9614..44ea25b 100644 --- a/.github/workflows/npm_napi_publish.yml +++ b/.github/workflows/npm_napi_publish.yml @@ -52,7 +52,7 @@ jobs: arch: x86_64-unknown-linux-gnu ext: "" docker_image: "" - additional_packages: "librust-atk-dev libgtk-3-dev libglib2.0-dev alsa-lib-dev" + additional_packages: "librust-atk-dev libgtk-3-dev libglib2.0-dev libasound2-dev" - name: windows-latest-16-cores-custom arch: x86_64-pc-windows-msvc ext: .exe From 659b6b3c699a7ca6cf99695c0c68ac837e2c74d9 Mon Sep 17 00:00:00 2001 From: nathan-tarr-orica Date: Fri, 13 Sep 2024 18:12:30 +1000 Subject: [PATCH 12/12] Update docker/napi/Dockerfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Loïs Postula --- docker/napi/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/napi/Dockerfile b/docker/napi/Dockerfile index 687a966..c1375fd 100644 --- a/docker/napi/Dockerfile +++ b/docker/napi/Dockerfile @@ -6,7 +6,7 @@ ENV PATH="/aarch64-linux-musl-cross/bin:/usr/local/cargo/bin/rustup:/root/.cargo CXX="clang++" \ GN_EXE=gn -RUN apk add --update --no-cache nodejs yarn bash clang wget cmake git openssh make perl pkgconfig openssl-dev curl gcc musl-dev linux-headers libudev-dev alsa-lib-dev libxcb-composite0-dev libgtk-3-dev +RUN apk add --update --no-cache nodejs yarn bash clang wget cmake git openssh make perl pkgconfig openssl-dev curl gcc musl-dev linux-headers libudev-dev libasound2-dev alsa-lib-dev libxcb-composite0-dev libgtk-3-dev WORKDIR /tmp