Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/actions/shell-with-output/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,21 @@ inputs:
command:
required: true
description: "The command"
id:
required: true
description: "The id for the step artifacts"
working-directory:
required: true
description: "The working directory"
loki_url:
required: true
description: 'URL to contact loki'
description: "URL to contact loki"
loki_org_id:
required: true
description: 'Loki Org Id'
description: "Loki Org Id"
loki_username:
required: true
description: 'Username to talk to loki'
description: "Username to talk to loki"
loki_password:
required: true
description: 'Password to talk to loki'
description: "Password to talk to loki"
outputs:
stdout:
description: "Command STDOUT"
Expand All @@ -48,11 +45,11 @@ runs:
rc=$?
fi
echo "exitcode=$rc" >> $GITHUB_OUTPUT
# - name: Upload to artifacts
# uses: actions/upload-artifact@v2
# with:
# name: ${{ github.action }}-stdout
# path: ${{ inputs.working-directory }}/output.txt
# - name: Upload to artifacts
# uses: actions/upload-artifact@v2
# with:
# name: ${{ github.action }}-stdout
# path: ${{ inputs.working-directory }}/output.txt
- name: Upload stdout
uses: ForesightMiningSoftwareCorporation/upload-log-to-loki@releases/v1
with:
Expand All @@ -61,7 +58,7 @@ runs:
loki_username: ${{ inputs.loki_username }}
loki_password: ${{ inputs.loki_password }}
loki_org_id: ${{ inputs.loki_org_id }}
loki_labels: 'job=${{ github.job }},workflow=${{ github.workflow }},action=${{ github.action }},id=${{ github.run_id }},repo=${{ github.repository }}'
loki_labels: "job=${{ github.job }},workflow=${{ github.workflow }},action=${{ github.action }},id=${{ github.run_id }},repo=${{ github.repository }}"
- name: Check exit code
shell: bash
run: |
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/build_rust_test_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
inputs:
rust_version:
description: "Rust version to install"
default: "1.69"
default: "1.70"
type: string
additional_tag:
description: "Additional tag for docker building"
Expand All @@ -15,14 +15,15 @@ on:
inputs:
rust_version:
description: "Rust version to install"
default: "1.69"
default: "1.70"
type: string

jobs:
build-rust-test-image:
runs-on: ubuntu-latest
if: ${{ inputs.rust_version != 'none' }}
steps:
- name: 'Checkout'
- name: "Checkout"
uses: actions/checkout@v3
- name: Login to ACR
uses: docker/login-action@v2
Expand All @@ -36,9 +37,11 @@ jobs:
- name: Build & Push
uses: docker/build-push-action@v3
with:
context: docker/rust-tests
context: https://github.com/ForesightMiningSoftwareCorporation/github.git#v1.2.0:docker/rust-tests
push: true
build-args: RUST_VERSION=${{ inputs.rust_version }}
build-args: |
RUST_VERSION=${{ inputs.rust_version }}
ADDITIONAL_CMD=${{ contains(inputs.rust_version, 'nightly') && 'rustup component add miri' || '' }}
tags: |
ghcr.io/foresightminingsoftwarecorporation/rust-test:${{ inputs.rust_version }}
ghcr.io/foresightminingsoftwarecorporation/rust-test:${{ inputs.additional_tag }}
${{ inputs.additional_tag && format('ghcr.io/foresightminingsoftwarecorporation/rust-test:{0}', inputs.additional_tag) || '' }}
41 changes: 29 additions & 12 deletions .github/workflows/rust-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,44 @@ on:
inputs:
skip-test:
type: string
default: 'false'
description: "Should the tests be ran"
default: "false"
description: "Should the tests be run"
skip-miri-test:
type: string
default: "true"
description: "Should miri tests be run"
skip-test-publish:
type: string
default: 'false'
description: "Should the publis dry-run test be ran"
default: "false"
description: "Should the public dry-run test be run"
publish:
type: string
default: 'false'
default: "false"
description: "Should the crate be published"
publish_private_registry:
type: string
default: 'false'
default: "false"
description: "Should the crate be published to the private registry"
publish_public_registry:
type: string
default: 'false'
default: "false"
description: "Should the crate be published to the public registry"
publish_docker:
type: string
default: 'false'
default: "false"
description: "Should the docker image be built and published"
publish_binary:
type: string
default: 'false'
default: "false"
description: "Should the binary be built and published"
toolchain:
type: string
default: "1.69"
description: Rust toolchain to install
miri_toolchain:
type: string
default: "nightly-2023-08-02"
description: Rust toolchain to use for Miri
release_channel:
type: string
default: ""
Expand Down Expand Up @@ -75,25 +83,32 @@ on:
default: Dockerfile
docker_image:
type: string
default: ''
default: ""
description: "Docker image name"
docker_registry:
type: string
default: "oreprohub.azurecr.io"
description: "Docker registry"
matrix_file:
type: string
default: '.github/workflows/matrix.json'
default: ".github/workflows/matrix.json"
description: "Matrix file to load"
post_build_additional_script:
type: string
default: ""
description: Post Build Additional script to run after the additional packages

jobs:
build_rust_ci_images:
uses: ForesightMiningSoftwareCorporation/github/.github/workflows/setup_rust_test_images.yaml@v1.2.0
with:
rust_versions: "${{ inputs.toolchain }} ${{ inputs.miri_toolchain }}"
secrets: inherit
test:
uses: ForesightMiningSoftwareCorporation/github/.github/workflows/rust-test.yml@v1.1.0
uses: ForesightMiningSoftwareCorporation/github/.github/workflows/rust-test.yml@v1.2.0
if: ${{ inputs.skip-test != 'true' }}
needs:
- build_rust_ci_images
with:
toolchain: ${{ inputs.toolchain }}
additional_cache_path: ${{ inputs.additional_cache_path }}
Expand All @@ -106,6 +121,8 @@ jobs:
custom_cargo_commands: ${{ inputs.custom_cargo_commands }}
login_private_registry: ${{ inputs.publish_public_registry != 'true' }}
skip-test-publish: ${{ inputs.skip-test-publish }}
skip-miri-test: ${{ inputs.skip-miri-test }}
nightly_toolchain: ${{ inputs.miri_toolchain }}
secrets: inherit
publish_private_registry:
uses: ForesightMiningSoftwareCorporation/github/.github/workflows/rust_private_registry_publish.yml@v1.1.0
Expand Down
Loading