Adds CI
This commit is contained in:
parent
e0e0c8addb
commit
54fc0190d0
|
|
@ -0,0 +1,52 @@
|
|||
// Don't forget to add http://192.168.1.37:8080/gitea-webhook/post as a gitea webhook
|
||||
|
||||
pipeline {
|
||||
agent { label 'rust_no_docker' }
|
||||
/* ===============
|
||||
BEGIN USER CONFIG
|
||||
================== */
|
||||
|
||||
environment {
|
||||
DEPLOY_DIR = "/mnt/books/" // Important, all books are in /mnt/book
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('Checkout') {
|
||||
steps {
|
||||
checkout scm // Checkout intead of full clone
|
||||
}
|
||||
}
|
||||
|
||||
/* ===============
|
||||
END USER CONFIG
|
||||
================== */
|
||||
|
||||
stage('Build Book') {
|
||||
steps {
|
||||
script {
|
||||
if (env.BRANCH_NAME == 'origin/review' || env.BRANCH_NAME == 'review' || env.BRANCH_NAME == 'origin/dev-ci' || env.BRANCH_NAME == 'dev-ci') {
|
||||
sh 'cargo test'
|
||||
} else if (env.BRANCH_NAME == 'origin/master' || env.BRANCH_NAME == 'master') {
|
||||
sh 'cargo test'
|
||||
} else {
|
||||
echo "Unknown branch: ${env.BRANCH_NAME} — skipping build."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
success {
|
||||
publishChecks conclusion: 'SUCCESS', name: 'Build Successful', summary: 'The build was successful', text: 'The build was sucessful', title: 'Build Successful'
|
||||
echo '✅Site Deployed!'
|
||||
}
|
||||
failure {
|
||||
publishChecks conclusion: 'FAILURE', name: 'Build Failed', summary: 'The build failed', text: 'The build was a failure', title: 'Build failed'
|
||||
echo '❌Site Failed to Deploy'
|
||||
}
|
||||
unstable{
|
||||
publishChecks conclusion: 'ACTION_REQUIRED', name: 'Build Unstable', summary: 'Unstable build', text: 'Unstable build', title: 'Build Unstable'
|
||||
}
|
||||
}
|
||||
}
|
||||
16
README.md
16
README.md
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
> 🚀 *Fast, type‑safe, and fully testable.*
|
||||
|
||||
---
|
||||
|
||||
## ✨ Quick start
|
||||
|
||||
|
|
@ -14,23 +13,23 @@
|
|||
git clone https://github.com/yourname/epoch_forge.git
|
||||
cd epoch_forge
|
||||
|
||||
# build the binary
|
||||
cargo build --release
|
||||
# install the binary
|
||||
cargo install --path .
|
||||
|
||||
# initialise an empty world (epoch 0)
|
||||
./target/release/efo epoch --init
|
||||
efo epoch --init
|
||||
|
||||
# add a guild
|
||||
./target/release/efo org add --name "The Iron Horde" --leader "Gorun"
|
||||
efo org add --name "The Iron Horde" --leader "Gorun"
|
||||
|
||||
# add a town
|
||||
./target/release/efo town add --name "Durn" --population 350
|
||||
efo town add --name "Durn" --population 350
|
||||
|
||||
# create an alliance
|
||||
./target/release/efo link add --type alliance --org "Iron Horde" --town "Durn"
|
||||
efo link add --type alliance --org "Iron Horde" --town "Durn"
|
||||
|
||||
# advance the timeline
|
||||
./target/release/efo epoch --advance 3
|
||||
efo epoch --advance 3
|
||||
|
||||
# inspect the world
|
||||
cat world.json
|
||||
|
|
@ -50,7 +49,6 @@ cat world.json
|
|||
| **CLI** | `efo` binary with sub‑commands | `efo` crate |
|
||||
| **Tests** | Unit & integration coverage | `tests/` |
|
||||
|
||||
---
|
||||
|
||||
### 📃 Quick reference table
|
||||
|
||||
|
|
|
|||
|
|
@ -18,19 +18,6 @@
|
|||
//! be persisted easily. The `World` struct also offers a convenient
|
||||
//! `World::load()` / `World::save()` API that uses the default JSON file
|
||||
//! (`world.json` in the current directory).
|
||||
//! ## Example
|
||||
//!
|
||||
//! ```rust
|
||||
//! use core::{World, OrgManager, Org};
|
||||
//!
|
||||
//! // create a new world and add an organisation
|
||||
//! let mut world = World::new();
|
||||
//! let org = Org::new("The Iron Horde", "Gorun");
|
||||
//! world.orgs().add(org);
|
||||
//!
|
||||
//! // persist it
|
||||
//! world.save().expect("save world");
|
||||
//! ```
|
||||
|
||||
pub mod error;
|
||||
// use async_trait::async_trait;
|
||||
|
|
|
|||
Loading…
Reference in New Issue