Skip to content

Commit 0a36559

Browse files
ci: fix workflow to checkout SDK dependency
1 parent 3dc6b97 commit 0a36559

1 file changed

Lines changed: 17 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,16 @@ jobs:
3535
artifact: darwin-aarch64
3636

3737
steps:
38-
- uses: actions/checkout@v4
38+
- name: Checkout agent
39+
uses: actions/checkout@v4
40+
with:
41+
path: agent
42+
43+
- name: Checkout SDK
44+
uses: actions/checkout@v4
45+
with:
46+
repository: raskell-io/sentinel-agent-rust-sdk
47+
path: sentinel-agent-rust-sdk
3948

4049
- name: Install Rust
4150
uses: dtolnay/rust-toolchain@stable
@@ -57,25 +66,26 @@ jobs:
5766
~/.cargo/registry/index/
5867
~/.cargo/registry/cache/
5968
~/.cargo/git/db/
60-
target/
61-
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
69+
agent/target/
70+
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('agent/**/Cargo.lock') }}
6271
restore-keys: |
6372
${{ runner.os }}-${{ matrix.target }}-cargo-
6473
6574
- name: Build release binary
75+
working-directory: agent
6676
run: cargo build --release --target ${{ matrix.target }}
6777

6878
- name: Strip binary (Linux native)
6979
if: matrix.target == 'x86_64-unknown-linux-gnu'
70-
run: strip target/${{ matrix.target }}/release/${{ env.BINARY_NAME }}
80+
run: strip agent/target/${{ matrix.target }}/release/${{ env.BINARY_NAME }}
7181

7282
- name: Strip binary (Linux cross)
7383
if: matrix.cross
74-
run: aarch64-linux-gnu-strip target/${{ matrix.target }}/release/${{ env.BINARY_NAME }}
84+
run: aarch64-linux-gnu-strip agent/target/${{ matrix.target }}/release/${{ env.BINARY_NAME }}
7585

7686
- name: Strip binary (macOS)
7787
if: contains(matrix.target, 'darwin')
78-
run: strip target/${{ matrix.target }}/release/${{ env.BINARY_NAME }}
88+
run: strip agent/target/${{ matrix.target }}/release/${{ env.BINARY_NAME }}
7989

8090
- name: Determine version
8191
id: version
@@ -89,7 +99,7 @@ jobs:
8999
- name: Package binary
90100
run: |
91101
mkdir -p dist
92-
cp target/${{ matrix.target }}/release/${{ env.BINARY_NAME }} dist/
102+
cp agent/target/${{ matrix.target }}/release/${{ env.BINARY_NAME }} dist/
93103
cd dist
94104
tar -czvf ${{ env.BINARY_NAME }}-${{ steps.version.outputs.version }}-${{ matrix.artifact }}.tar.gz ${{ env.BINARY_NAME }}
95105

0 commit comments

Comments
 (0)