-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: ChaudharyRaman <[email protected]> change build_xline workflow Signed-off-by: ChaudharyRaman <[email protected]> fix: trailing space Signed-off-by: ChaudharyRaman <[email protected]> feat: bump script version Signed-off-by: ChaudharyRaman <[email protected]>
- Loading branch information
1 parent
85e7891
commit 2eb0227
Showing
3 changed files
with
109 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Build Xline | ||
env: | ||
CI_RUST_TOOLCHAIN: 1.71.0 | ||
on: | ||
workflow_call: | ||
inputs: | ||
release_bin: | ||
description: "list of binaries to build" | ||
required: true | ||
type: string | ||
additional_setup_commands: | ||
description: "Additional commands to run after initial setup, before running the script" | ||
required: false | ||
default: "" | ||
type: string | ||
docker_xline_image: | ||
description: "Docker image to use for building" | ||
required: true | ||
type: string | ||
binaries: | ||
description: "Comma-separated list of binaries to copy" | ||
required: true | ||
type: string | ||
script_name: | ||
description: "Name of the script to run" | ||
required: true | ||
type: string | ||
uploadLogs: | ||
description: "Boolean to decide if logs should be uploaded" | ||
required: false | ||
default: false | ||
type: boolean | ||
uploadBenchmark: | ||
description: "Boolean to decide if benchmark output should be uploaded" | ||
required: false | ||
default: false | ||
type: boolean | ||
jobs: | ||
build_and_test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Configure sccache | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); | ||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); | ||
- name: Build xline | ||
run: | | ||
docker run -q --rm -v $(pwd):/xline \ | ||
-e SCCACHE_GHA_ENABLED=on \ | ||
-e ACTIONS_CACHE_URL=${ACTIONS_CACHE_URL} \ | ||
-e ACTIONS_RUNTIME_TOKEN=${ACTIONS_RUNTIME_TOKEN} \ | ||
${{ inputs.docker_xline_image }} \ | ||
cargo build --release ${{ inputs.release_bin }} | ||
- run: | | ||
cd scripts | ||
cp ../target/release/{${{ inputs.binaries }}} . | ||
${{ inputs.additional_setup_commands }} | ||
bash ./${{ inputs.script_name }} | ||
- name: Upload logs | ||
if: ${{ inputs.uploadLogs }} && (failure() || cancelled()) | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Xline logs | ||
path: scripts/logs | ||
|
||
- name: Upload benchmark output | ||
if: ${{ inputs.uploadBenchmark }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: benchmark-output | ||
path: scripts/out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters