Skip to content

Commit

Permalink
Merge branch 'main' into loispostula-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
loispostula authored Sep 13, 2024
2 parents 2966a7f + 659b6b3 commit 7c12c8d
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 29 deletions.
25 changes: 24 additions & 1 deletion .github/actions/login-private-registry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ 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"
cos_subscription:
default: ""
description: "Subscription to connect to cos"
host:
default: ""
description: "DEPRECATED"
Expand Down Expand Up @@ -56,10 +68,21 @@ 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 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 != '' && inputs.cos_subscription != ''
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:
Expand Down
20 changes: 7 additions & 13 deletions .github/workflows/ci_runner_set_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,16 @@ 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 }}
cos_subscription: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_SUBSCRIPTION }}
additional_private_keys: |
${{ secrets.OREPROLIB_SSH_PRIVATE_KEY }}
${{ secrets.SPARKL_BLAST_SSH_PRIVATE_KEY }}
Expand Down
13 changes: 10 additions & 3 deletions .github/workflows/npm_napi_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -67,12 +67,16 @@ 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 }}
cos_subscription: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_SUBSCRIPTION }}

- name: Build rust package
uses: ForesightMiningSoftwareCorporation/github/.github/actions/build-napi-artifact@v3.0.0
Expand Down Expand Up @@ -129,12 +133,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
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/rust-update-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,17 @@ 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 }}
cos_subscription: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_SUBSCRIPTION }}
- name: Run UpdateCli Autodiscovery
shell: bash
run: |
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/rust_binary_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,16 @@ 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 }}
cos_subscription: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_SUBSCRIPTION }}
additional_private_keys: |
${{ secrets.FSE_SSH_PRIVATE_KEY }}
${{ secrets.BEVY_CLIPMAP_SSH_PRIVATE_KEY }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/rust_registry_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,17 @@ 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 }}
cos_subscription: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_SUBSCRIPTION }}
additional_private_keys: |
${{ secrets.FSE_SSH_PRIVATE_KEY }}
${{ secrets.VOLUMESIGHT_SSH_PRIVATE_KEY }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/rust_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,12 +162,16 @@ 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 }}
cos_subscription: ${{ secrets.CARGO_COS_PRIVATE_REGISTRY_SUBSCRIPTION }}
additional_private_keys: |
${{ secrets.FSE_SSH_PRIVATE_KEY }}
${{ secrets.BEVY_CLIPMAP_SSH_PRIVATE_KEY }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_release_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
1 change: 0 additions & 1 deletion docker/napi/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ ENV PATH="/aarch64-linux-musl-cross/bin:/usr/local/cargo/bin/rustup:/root/.cargo

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 eudev-dev alsa-lib-dev libxcb-dev gtk+3.0-dev


WORKDIR /tmp

RUN curl -fLO "https://www.openssl.org/source/openssl-1.1.1m.tar.gz"
Expand Down
15 changes: 14 additions & 1 deletion docker/rust-tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 default ${RUST_VERSION}
RUN rustup component add clippy rustfmt
RUN cargo install --locked cargo-deny
RUN cargo install cargo-machete
Expand Down

0 comments on commit 7c12c8d

Please sign in to comment.