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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths:
|
|
||||||
- 'botlib/**'
|
|
||||||
- '.forgejo/workflows/botlib.yaml'
|
|
||||||
env:
|
env:
|
||||||
SCCACHE_DIR: /opt/gbo/work/.sccache
|
|
||||||
CARGO_TARGET_DIR: /opt/gbo/work/target
|
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
|
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -23,4 +18,4 @@ jobs:
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
cd /opt/gbo/work/generalbots
|
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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths:
|
|
||||||
- 'botserver/**'
|
|
||||||
- 'botlib/**'
|
|
||||||
- 'Cargo.lock'
|
|
||||||
- '.forgejo/workflows/botserver.yaml'
|
|
||||||
env:
|
env:
|
||||||
SCCACHE_DIR: /opt/gbo/work/.sccache
|
|
||||||
CARGO_TARGET_DIR: /opt/gbo/work/target
|
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
|
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -22,15 +15,16 @@ jobs:
|
||||||
git reset --hard HEAD
|
git reset --hard HEAD
|
||||||
git clean -fd
|
git clean -fd
|
||||||
git pull
|
git pull
|
||||||
|
mkdir -p /opt/gbo/work/target
|
||||||
|
mkdir -p /opt/gbo/bin
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cd /opt/gbo/work/generalbots
|
cd /opt/gbo/work/generalbots
|
||||||
cargo build -p botserver --bin botserver
|
CARGO_BUILD_JOBS=4 cargo build -p botserver --bin botserver
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
run: |
|
run: |
|
||||||
timeout 5 bash -c 'while pgrep -x botserver > /dev/null; do pkill -x botserver; sleep 0.5; done' || true
|
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/target/debug/botserver /opt/gbo/bin/
|
||||||
cp -f /opt/gbo/work/generalbots/target/debug/botserver /opt/gbo/bin/
|
|
||||||
chmod +x /opt/gbo/bin/botserver
|
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 &
|
cd /opt/gbo/bin && RUST_LOG=info nohup ./botserver --noconsole > /opt/gbo/logs/stdout.log 2> /opt/gbo/logs/stderr.log &
|
||||||
sleep 5
|
sleep 5
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,8 @@ name: Bottest CI
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths:
|
|
||||||
- 'bottest/**'
|
|
||||||
- 'botlib/**'
|
|
||||||
- '.forgejo/workflows/bottest.yaml'
|
|
||||||
env:
|
env:
|
||||||
SCCACHE_DIR: /opt/gbo/work/.sccache
|
|
||||||
CARGO_TARGET_DIR: /opt/gbo/work/target
|
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
|
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -24,4 +18,4 @@ jobs:
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
cd /opt/gbo/work/generalbots
|
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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths:
|
|
||||||
- 'botui/**'
|
|
||||||
- 'botlib/**'
|
|
||||||
- '.forgejo/workflows/botui.yaml'
|
|
||||||
env:
|
env:
|
||||||
SCCACHE_DIR: /opt/gbo/work/.sccache
|
|
||||||
CARGO_TARGET_DIR: /opt/gbo/work/target
|
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
|
PATH: /home/gbuser/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -21,16 +15,17 @@ jobs:
|
||||||
git reset --hard HEAD
|
git reset --hard HEAD
|
||||||
git clean -fd
|
git clean -fd
|
||||||
git pull
|
git pull
|
||||||
|
mkdir -p /opt/gbo/work/target
|
||||||
|
mkdir -p /opt/gbo/bin
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cd /opt/gbo/work/generalbots
|
cd /opt/gbo/work/generalbots
|
||||||
cargo build -p botui --bin botui
|
CARGO_BUILD_JOBS=4 cargo build -p botui --bin botui
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
run: |
|
run: |
|
||||||
timeout 5 bash -c 'while pgrep -x botui > /dev/null; do pkill -x botui; sleep 0.5; done' || true
|
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/target/debug/botui /opt/gbo/bin/
|
||||||
cp -f /opt/gbo/work/generalbots/target/debug/botui /opt/gbo/bin/
|
|
||||||
chmod +x /opt/gbo/bin/botui
|
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
|
sleep 3
|
||||||
pgrep -x botui && echo "BotUI Deployed" || echo "Failed"
|
pgrep -x botui && echo "BotUI Deployed" || echo "Failed"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue