fix: Remove sccache from CI (permission issues), fix deploy binary paths
- Remove RUSTC_WRAPPER=sccache from all workflows (permission denied in act container environment) - Fix deploy paths to use CARGO_TARGET_DIR=/opt/gbo/work/target instead of relative target/debug - Remove path triggers from botserver workflow (all pushes trigger) - Add mkdir for target and bin dirs in setup steps
This commit is contained in:
parent
f6e869c930
commit
4380b39ac5
4 changed files with 11 additions and 33 deletions
|
|
@ -2,13 +2,8 @@ name: Botlib CI
|
|||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'botlib/**'
|
||||
- '.forgejo/workflows/botlib.yaml'
|
||||
env:
|
||||
SCCACHE_DIR: /opt/gbo/work/.sccache
|
||||
CARGO_TARGET_DIR: /opt/gbo/work/target
|
||||
RUSTC_WRAPPER: sccache
|
||||
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
jobs:
|
||||
build:
|
||||
|
|
@ -23,4 +18,4 @@ jobs:
|
|||
- name: Test
|
||||
run: |
|
||||
cd /opt/gbo/work/generalbots
|
||||
cargo test -p botlib
|
||||
CARGO_BUILD_JOBS=4 cargo test -p botlib
|
||||
|
|
|
|||
|
|
@ -2,15 +2,8 @@ name: BotServer CI
|
|||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'botserver/**'
|
||||
- 'botlib/**'
|
||||
- 'Cargo.lock'
|
||||
- '.forgejo/workflows/botserver.yaml'
|
||||
env:
|
||||
SCCACHE_DIR: /opt/gbo/work/.sccache
|
||||
CARGO_TARGET_DIR: /opt/gbo/work/target
|
||||
RUSTC_WRAPPER: sccache
|
||||
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
jobs:
|
||||
build:
|
||||
|
|
@ -22,15 +15,16 @@ jobs:
|
|||
git reset --hard HEAD
|
||||
git clean -fd
|
||||
git pull
|
||||
mkdir -p /opt/gbo/work/target
|
||||
mkdir -p /opt/gbo/bin
|
||||
- name: Build
|
||||
run: |
|
||||
cd /opt/gbo/work/generalbots
|
||||
cargo build -p botserver --bin botserver
|
||||
CARGO_BUILD_JOBS=4 cargo build -p botserver --bin botserver
|
||||
- name: Deploy
|
||||
run: |
|
||||
timeout 5 bash -c 'while pgrep -x botserver > /dev/null; do pkill -x botserver; sleep 0.5; done' || true
|
||||
mkdir -p /opt/gbo/bin
|
||||
cp -f /opt/gbo/work/generalbots/target/debug/botserver /opt/gbo/bin/
|
||||
cp -f /opt/gbo/work/target/debug/botserver /opt/gbo/bin/
|
||||
chmod +x /opt/gbo/bin/botserver
|
||||
cd /opt/gbo/bin && RUST_LOG=info nohup ./botserver --noconsole > /opt/gbo/logs/stdout.log 2> /opt/gbo/logs/stderr.log &
|
||||
sleep 5
|
||||
|
|
|
|||
|
|
@ -2,14 +2,8 @@ name: Bottest CI
|
|||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'bottest/**'
|
||||
- 'botlib/**'
|
||||
- '.forgejo/workflows/bottest.yaml'
|
||||
env:
|
||||
SCCACHE_DIR: /opt/gbo/work/.sccache
|
||||
CARGO_TARGET_DIR: /opt/gbo/work/target
|
||||
RUSTC_WRAPPER: sccache
|
||||
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
jobs:
|
||||
build:
|
||||
|
|
@ -24,4 +18,4 @@ jobs:
|
|||
- name: Test
|
||||
run: |
|
||||
cd /opt/gbo/work/generalbots
|
||||
cargo test -p bottest
|
||||
CARGO_BUILD_JOBS=4 cargo test -p bottest
|
||||
|
|
|
|||
|
|
@ -2,14 +2,8 @@ name: BotUI CI
|
|||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'botui/**'
|
||||
- 'botlib/**'
|
||||
- '.forgejo/workflows/botui.yaml'
|
||||
env:
|
||||
SCCACHE_DIR: /opt/gbo/work/.sccache
|
||||
CARGO_TARGET_DIR: /opt/gbo/work/target
|
||||
RUSTC_WRAPPER: sccache
|
||||
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
jobs:
|
||||
build:
|
||||
|
|
@ -21,16 +15,17 @@ jobs:
|
|||
git reset --hard HEAD
|
||||
git clean -fd
|
||||
git pull
|
||||
mkdir -p /opt/gbo/work/target
|
||||
mkdir -p /opt/gbo/bin
|
||||
- name: Build
|
||||
run: |
|
||||
cd /opt/gbo/work/generalbots
|
||||
cargo build -p botui --bin botui
|
||||
CARGO_BUILD_JOBS=4 cargo build -p botui --bin botui
|
||||
- name: Deploy
|
||||
run: |
|
||||
timeout 5 bash -c 'while pgrep -x botui > /dev/null; do pkill -x botui; sleep 0.5; done' || true
|
||||
mkdir -p /opt/gbo/bin
|
||||
cp -f /opt/gbo/work/generalbots/target/debug/botui /opt/gbo/bin/
|
||||
cp -f /opt/gbo/work/target/debug/botui /opt/gbo/bin/
|
||||
chmod +x /opt/gbo/bin/botui
|
||||
cd /opt/gbo/bin && RUST_LOG=info nohup ./botui --noconsole >> /opt/gbo/logs/stdout.log 2>> /opt/gbo/logs/stderr.log &
|
||||
cd /opt/gbo/bin && RUST_LOG=info nohup ./botui >> /opt/gbo/logs/stdout.log 2>> /opt/gbo/logs/stderr.log &
|
||||
sleep 3
|
||||
pgrep -x botui && echo "BotUI Deployed" || echo "Failed"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue