CI
Chester Wyke September 03, 2023 Updated: April 15, 2025 #rustConditional Compilation
Install
Crate Serde
References
Cargo
Toolchain (Nightly)
String Formatting
Time
Crate Tokio
Publish Crate
rustfmt
Single file script
Snippets
CI
Pattern Type State
WASM
Create New Crate
Documentation
JSON
Pattern Builder
Testing
Working with collections of bytes
Thoughts about rust
Are we yet
OnceLock
Crate Actix Web
Stack Overflow
Crate Clap
Crate Poll Promise
Crate Insta
Tips
Create new egui project
Crate CSV
Crate egui
Iterators
Crate Tracing Subscriber
Regex
vscode
Enum Conversion
Macros
lettre
Google APIs
Source: https://youtu.be/xUH-4y92jPg?si=3eY_i02onu60bVQ4&t=495
Source GitRepo: https://github.com/jonhoo/rust-ci-conf/
Our GitRepo: https://github.com/wykies/rust-ci-conf/
Link to CI Repo
To add to a repo with option to pull changes later
For SSH
For HTTPS (Not tested)
Fetch from CI Repo
Initially merge into current history
Warning: If you are using gitflow, initialize it BEFORE doing this. See reason / case tested.
And DON’T use the sync
button in vscode until you do the git push
at the end of the instructions.
Push Changes
NOTE: use the command line for this not the sync
button in vscode.
Update with new CI config
When the CI has been updated and you want to pull in the updates use the following command.
Explanation of problem situation
Problem is that I was using the --allow-unrelated
each time. And it was copying in the entire remote history each time. But this only seemed to happen if I initialized gitflow after having done the initial time. See actual steps that caused this problem. This may not be the only possible reason, more testing was not done to disprove other solutions.
Discovered this by:
- Running the initial merge command on main
- Repeating the initial merge on main to confirm it says “Already up to date”
- Initializing gitflow
- Trying the initial merge command again on develop and noticing that it brought in all the history again.
- Repeated several times and each time it brought in all the history again
- After resting the history I did it on develop and repeated without issue.
- Branched off develop and used the initial merge command again and it said up to date
I also ended up in the problem situation after gitflow had been started, when I used the sync
button in vscode.
Didn’t do more testing to figure it out but noted so avoid ending up in that problem again or for later testing.