Set up continuous integration in Forgejo #75

Open
Vectornaut wants to merge 12 commits from Vectornaut/dyna3:forgejo-ci into main

12 commits

Author SHA1 Message Date
Aaron Fenyes
df2d45816c Find the home directory instead of hard-coding it
All checks were successful
/ test (pull_request) Successful in 2m19s
This should make the `setup-trunk` workflow more container-independent.
2025-03-30 13:05:20 -07:00
Aaron Fenyes
992fb76419 Do the Trunk build check as an end-to-end test
All checks were successful
/ test (pull_request) Successful in 2m18s
This consolidates our whole CI workflow into `cargo test`.
2025-03-28 12:30:02 -07:00
Aaron Fenyes
0a9d234557 Run the examples as tests
All checks were successful
/ build (pull_request) Successful in 1m17s
/ test (pull_request) Successful in 1m8s
2025-03-28 00:36:38 -07:00
Aaron Fenyes
7f45e98b46 Switch to CircleCI's Rust + Node container image
All checks were successful
/ build (pull_request) Successful in 2m24s
/ test (pull_request) Successful in 1m8s
/ run-examples (pull_request) Successful in 1m3s
This should make the `checkout` work on the runner host.
2025-03-27 22:19:54 -07:00
Aaron Fenyes
4251242953 Run CI on a stock image, installing Trunk by hand
Some checks failed
/ build (pull_request) Failing after 4s
/ test (pull_request) Failing after 3s
/ run-examples (pull_request) Failing after 4s
Instead of building a custom CI image with Trunk pre-installed, let's
try running CI on a stock image, installing Trunk from a binary on every
workflow run.
2025-03-27 20:46:02 -07:00
Aaron Fenyes
f212cfadf4 Tell Docker to build Trunk with only one job
Some checks failed
/ setup-image (pull_request) Failing after 23m14s
/ build (pull_request) Has been cancelled
/ test (pull_request) Has been cancelled
/ run-examples (pull_request) Has been cancelled
This might reduce the amount of memory it takes to build the CI image.
2025-03-27 18:28:17 -07:00
Aaron Fenyes
15375dc932 Remove the CI image setup script
Some checks failed
/ setup-image (pull_request) Failing after 23m20s
/ build (pull_request) Has been cancelled
/ test (pull_request) Has been cancelled
/ run-examples (pull_request) Has been cancelled
The CI workflow now builds and tags the CI image automatically, so we
don't need the manual setup script anymore.
2025-03-26 02:32:25 -07:00
Aaron Fenyes
5f45c9c7a4 Set up the CI image during the CI workflow 2025-03-26 02:12:05 -07:00
Aaron Fenyes
71f4cd184c Fail continuous integration on warnings
Some checks failed
/ build (pull_request) Failing after 1s
/ test (pull_request) Failing after 1s
/ run-examples (pull_request) Failing after 1s
2025-03-12 15:44:43 -07:00
Aaron Fenyes
4442dd860b Run continuous integration on a custom image
Write a Dockerfile that describes a Debian image with our build
environment set up in it. Write a script that builds and tags the custom
image. Set the continuous integration workflow to run on the custom
image, pulled from Docker's local image store.

Running the examples on the custom image takes the same steps as running
them on a development machine, so we no longer gain anything from
factoring out the `cargo run --example` steps. That means we can get rid
of the `run-examples` action. Since the build environment is now set up
ahead of time, we can get rid of the `setup-rust` action too.
2025-03-12 15:44:43 -07:00
Aaron Fenyes
bbfdf2b87f Prototype a continuous integration workflow
This workflow is too spendthrift for deployment: every job sets up Rust,
and the `build` job also installs Trunk, which takes even more
resources. The workflow serves well, however, as a proof of concept.
Introducing a syntax error into `src/main.rs` causes the `build` and
`test` jobs to fail, but allows `run-examples` to succeed. Similarly,
introducing a syntax error into `examples/point-on-sphere.rs` causes
`run-examples` to fail, but allows the other jobs to succeed.
2025-03-12 15:44:43 -07:00
Aaron Fenyes
d243f19e25 Start tracking Cargo.lock 2025-03-12 15:44:43 -07:00