From 3303ae4be0ce50860ab932ab2847fbb2d5cb3001 Mon Sep 17 00:00:00 2001 From: "Rodrigo Rodriguez (Pragmatismo)" Date: Tue, 16 Dec 2025 13:25:15 -0300 Subject: [PATCH] Add Forgejo CI workflow for botlib - Compile Rust library --- .forgejo/workflows/botlib.yaml | 41 ++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .forgejo/workflows/botlib.yaml diff --git a/.forgejo/workflows/botlib.yaml b/.forgejo/workflows/botlib.yaml new file mode 100644 index 0000000..eced3e5 --- /dev/null +++ b/.forgejo/workflows/botlib.yaml @@ -0,0 +1,41 @@ +name: GBCI + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + build: + runs-on: gbo + + steps: + - name: Disable SSL verification (temporary) + run: git config --global http.sslVerify false + + - uses: actions/checkout@v4 + + - name: Install Rust + uses: msrd0/rust-toolchain@v1 + with: + toolchain: stable + + - name: Build library (default features) + run: cargo build --locked + + - name: Build library (full features) + run: cargo build --locked --features full + + - name: Run tests + run: cargo test --locked --features full + + - name: Build release + run: cargo build --locked --release --features full + + - name: Deploy library + run: | + sudo mkdir -p /opt/gbo/lib/botlib + sudo cp ./target/release/libbotlib.rlib /opt/gbo/lib/botlib/ || true + sudo cp ./target/release/libbotlib.a /opt/gbo/lib/botlib/ || true + sudo cp ./target/release/libbotlib.so /opt/gbo/lib/botlib/ || true