ci: Simplify git pull - remove stash and rebase
This commit is contained in:
parent
b31e08004f
commit
7fcfb184e5
1 changed files with 26 additions and 22 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
name: BotServer CI
|
name: BotServer CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths:
|
paths:
|
||||||
- "botserver/**"
|
- "botserver/**"
|
||||||
|
|
@ -10,6 +10,7 @@ on:
|
||||||
- ".forgejo/workflows/botserver.yaml"
|
- ".forgejo/workflows/botserver.yaml"
|
||||||
- "Cargo.toml"
|
- "Cargo.toml"
|
||||||
- "Cargo.lock"
|
- "Cargo.lock"
|
||||||
|
- "Cargo.lock"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
@ -18,20 +19,23 @@ jobs:
|
||||||
CARGO_INCREMENTAL: 1
|
CARGO_INCREMENTAL: 1
|
||||||
RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
|
RUSTFLAGS: "-C link-arg=-fuse-ld=mold"
|
||||||
PATH: "/home/gbuser/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/sbin:/bin"
|
PATH: "/home/gbuser/.cargo/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/sbin:/bin"
|
||||||
steps:
|
steps:
|
||||||
- name: Setup
|
- name: Setup
|
||||||
run: |
|
run: |
|
||||||
cd /opt/gbo/work/generalbots
|
cd /opt/gbo/work/generalbots
|
||||||
git stash 2>/dev/null || true
|
git pull
|
||||||
git pull --rebase || { git rebase --abort; git reset --hard origin/main; }
|
|
||||||
git log --oneline -1
|
git log --oneline -1
|
||||||
|
|
||||||
- name: Build BotServer and BotUI
|
- name: Build BotServer and BotUI
|
||||||
run: |
|
run: |
|
||||||
cd /opt/gbo/work/generalbots
|
cd /opt/gbo/work/generalbots
|
||||||
rustup default stable
|
rustup default stable
|
||||||
|
export CARGO_HOME=/home/gbuser/.cargo
|
||||||
|
export RUSTC_WRAPPER=sccache
|
||||||
|
sccache --start-server || true
|
||||||
CARGO_BUILD_JOBS=24 cargo build -p botserver --bin botserver
|
CARGO_BUILD_JOBS=24 cargo build -p botserver --bin botserver
|
||||||
CARGO_BUILD_JOBS=24 cargo build -p botui --bin botui --release --features embed-ui
|
CARGO_BUILD_JOBS=24 cargo build -p botui --bin botui --release --features embed-ui
|
||||||
|
sccache --show-stats || true
|
||||||
|
|
||||||
- name: Deploy to Stage
|
- name: Deploy to Stage
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue