Skip to content

Commit a177bbb

Browse files
feat(run-integration-test): Add interu tool (#26)
Co-authored-by: Nick <10092581+NickLarsenNZ@users.noreply.github.com>
1 parent db9b817 commit a177bbb

18 files changed

+2105
-0
lines changed

.github/workflows/build_interu.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build interu
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
os:
7+
required: true
8+
type: string
9+
target:
10+
required: true
11+
type: string
12+
upload:
13+
default: false
14+
type: boolean
15+
16+
env:
17+
RUST_VERSION: 1.83.0
18+
19+
jobs:
20+
build:
21+
name: Build interu-${{ inputs.target }}
22+
runs-on: ${{ inputs.os }}
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
with:
27+
persist-credentials: false
28+
29+
- uses: dtolnay/rust-toolchain@0e66bd3e6b38ec0ad5312288c83e47c143e6b09e # v1
30+
with:
31+
toolchain: ${{ env.RUST_VERSION }}
32+
targets: ${{ inputs.target }}
33+
34+
- name: Build Binary
35+
run: cargo build --target ${{ inputs.target }} --release --package interu
36+
37+
- name: Rename Binary
38+
run: mv target/${{ inputs.target }}/release/interu interu-${{ inputs.target }}
39+
40+
- name: Upload Artifact
41+
if: inputs.upload
42+
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
43+
with:
44+
path: interu-${{ inputs.target }}

.github/workflows/pr_interu.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build interu
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- .github/workflows/release_interu.yml
7+
- .github/workflows/build_interu.yml
8+
- .github/workflows/pr_interu.yml
9+
- rust-toolchain.toml
10+
- tools/interu/**
11+
- Cargo.toml
12+
13+
jobs:
14+
build:
15+
uses: ./.github/workflows/build_interu.yml
16+
with:
17+
target: ${{ matrix.target }}
18+
os: ${{ matrix.os }}
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- target: x86_64-unknown-linux-gnu
25+
os: ubuntu-latest

.github/workflows/release_interu.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release interu
2+
3+
on:
4+
push:
5+
tags:
6+
- "interu-[0-9]+.[0-9]+.[0-9]+**"
7+
8+
jobs:
9+
build:
10+
uses: ./.github/workflows/build_interu.yml
11+
with:
12+
upload: true
13+
target: ${{ matrix.target }}
14+
os: ${{ matrix.os }}
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- target: x86_64-unknown-linux-gnu
21+
os: ubuntu-latest
22+
release:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Download Artifacts
26+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
27+
with:
28+
path: artifacts
29+
30+
- name: Upload Release Binary
31+
uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v2.2.0
32+
with:
33+
files: artifacts/*

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
__pycache__
2+
/target

0 commit comments

Comments
 (0)