-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathsec-core-source-code-build.yaml
More file actions
75 lines (72 loc) · 2.57 KB
/
sec-core-source-code-build.yaml
File metadata and controls
75 lines (72 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: sec-core-source-code-build
on:
pull_request:
branches:
- main
- 'release/agent-sec-core/**'
paths:
- 'src/agent-sec-core/**'
- 'scripts/build-all.sh'
- '.github/workflows/sec-core-source-code-build.yaml'
workflow_dispatch:
permissions:
contents: read
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu 22.04
runner: ubuntu-22.04
container: ''
- name: Alinux4
runner: ubuntu-22.04
container: alibaba-cloud-linux-4-registry.cn-hangzhou.cr.aliyuncs.com/alinux4/alinux4:latest
name: Source Build (${{ matrix.name }})
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container || '' }}
steps:
- name: Configure mirrors and install base tools (Alinux4)
if: matrix.container != ''
run: |
sed -i -e "s/cloud.aliyuncs/aliyun/g" /etc/yum.repos.d/*.repo
dnf install -y tar git sudo
# Fix sudo PAM in container: replace with permissive config
cat > /etc/pam.d/sudo <<'EOF'
#%PAM-1.0
auth sufficient pam_rootok.so
account sufficient pam_permit.so
session sufficient pam_permit.so
EOF
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.93.0
with:
components: clippy, rustfmt, rust-src
- name: Build and install
run: ./scripts/build-all.sh --component sec-core
- name: Verify CLI
run: |
agent-sec-cli --version
agent-sec-cli --help
- name: Verify sandbox
run: linux-sandbox --help
- name: Verify deployment
run: |
echo "=== Skills ==="
ls ~/.copilot-shell/skills/
echo "=== Cosh Extension ==="
ls ~/.copilot-shell/extensions/agent-sec-core/
ls ~/.copilot-shell/extensions/agent-sec-core/hooks/
echo "=== OpenClaw Plugin ==="
ls ~/.local/lib/anolisa/sec-core/openclaw-plugin/
ls ~/.local/lib/anolisa/sec-core/openclaw-plugin/dist/
ls ~/.local/lib/anolisa/sec-core/openclaw-plugin/scripts/
echo "=== Hermes Plugin ==="
ls ~/.local/lib/anolisa/sec-core/hermes-plugin/src/
ls ~/.local/lib/anolisa/sec-core/hermes-plugin/src/plugin.yaml
ls ~/.local/lib/anolisa/sec-core/hermes-plugin/scripts/deploy.sh
echo "=== CLI venv ==="
ls ~/.local/lib/anolisa/sec-core/venv/bin/agent-sec-cli
- name: Run E2E tests
run: make -C src/agent-sec-core test-e2e-source-build