12 Commits

Author SHA1 Message Date
0759c64513 infra: actions: add check-format job
Some checks failed
Gentoo Utils / build-oci-image (push) Has started running
Gentoo Utils / build (push) Has been cancelled
Gentoo Utils / test (push) Has been cancelled
Gentoo Utils / check-format (push) Has been cancelled
2025-12-12 13:51:09 -06:00
e04e57e927 infra: actions: add test job 2025-12-12 13:51:05 -06:00
81aedc608d infra: actions: set build job to only build 2025-12-12 13:32:00 -06:00
5cd318bc9f FIXME: committing this just to test the check format job 2025-12-12 13:31:40 -06:00
34662a99cd infra: image: switch to using ${{ vars.REGISTRY_URL }}
All checks were successful
Gentoo Utils / build-oci-image (push) Successful in 5m9s
Gentoo Utils / build (push) Successful in 1m33s
Doing this so I can change this site wide in the future without anything breaking
2025-12-08 20:47:12 -06:00
d2ce6bc8ff infra: image: fixes image_tag 2025-12-08 20:47:12 -06:00
91dcd3b3fb infra: image: fix image tag for build job 2025-12-08 20:47:12 -06:00
e9386ad64a infra: image: build image for branches if they dont exist 2025-12-08 20:47:12 -06:00
c288787d91 infra: image: fixes c35db0f 2025-12-08 20:47:12 -06:00
df10b0fac0 infra: image: protect :latest tag so only the default branch can push to it
infra: image: fix hard coded image name
2025-12-08 20:47:12 -06:00
407b836c77 infra: image: create entrypoint script and put env sources in it 2025-12-08 20:47:12 -06:00
2c8a6c3783 infra: simplify pipeline logic 2025-12-08 20:47:10 -06:00
9 changed files with 20 additions and 26 deletions

View File

@@ -3,12 +3,12 @@
(rust-cargo-default-arguments . "-r") (rust-cargo-default-arguments . "-r")
(eglot-workspace-configuration . (:rust-analyzer (eglot-workspace-configuration . (:rust-analyzer
(:check (:check
(:overrideCommand ["./rust-analyzer.sh"])))) (:overrideCommand ["ninja" "clippy-json" "-C" "build"]))))
(eval . (add-to-list 'eglot-server-programs (eval . (add-to-list 'eglot-server-programs
'((rust-ts-mode rust-mode) . '((rust-ts-mode rust-mode) .
("rust-analyzer" :initializationOptions ("rust-analyzer" :initializationOptions
(:check (:check
(:overrideCommand ["./rust-analyzer.sh"])))))) (:overrideCommand ["ninja" "clippy-json" "-C" "build"]))))))
(eval . (eglot-ensure)) (eval . (eglot-ensure))
(eval . (company-mode 1)) (eval . (company-mode 1))
(eval . (add-hook 'before-save-hook 'fmt-current-buffer nil t)) (eval . (add-hook 'before-save-hook 'fmt-current-buffer nil t))

View File

@@ -2,4 +2,4 @@
ninja rustfmt -C build ninja rustfmt -C build
ninja rustdoc -C build ninja rustdoc -C build
ninja clippy -C build ninja clippy -C build
ninja test -C build meson test -C build

View File

@@ -1,4 +1,3 @@
#![deny(unused_imports)]
#![allow(clippy::missing_safety_doc)] #![allow(clippy::missing_safety_doc)]
use core::slice; use core::slice;

View File

@@ -1,12 +1,12 @@
gencorpus = executable( gencorpus = executable(
'atom_parser_gencorpus', 'gencorpus',
'gencorpus.rs', 'gencorpus.rs',
dependencies: [mon], dependencies: [mon],
link_with: [gentoo_utils], link_with: [gentoo_utils],
) )
corpus = custom_target( corpus = custom_target(
'atom_parser_corpus', 'corpus',
output: 'corpus', output: 'corpus',
command: [gencorpus, 'corpus'], command: [gencorpus, 'corpus'],
) )

View File

@@ -1,8 +1,9 @@
#![deny(unused_imports)]
use core::slice; use core::slice;
use gentoo_utils::{Parseable, atom::Version}; use gentoo_utils::{
use mon::{Parser, input::InputIter}; Parseable,
atom::{Atom, Version},
};
use mon::{Parser, ParserFinishedError, input::InputIter};
use std::{ use std::{
cmp::Ordering, cmp::Ordering,
io::{BufRead, BufReader, Write}, io::{BufRead, BufReader, Write},

View File

@@ -1,12 +1,12 @@
gencorpus = executable( gencorpus = executable(
'atom_vercmp_gencorpus', 'gencorpus',
'gencorpus.rs', 'gencorpus.rs',
dependencies: [mon], dependencies: [mon],
link_with: [gentoo_utils], link_with: [gentoo_utils],
) )
corpus = custom_target( corpus = custom_target(
'atom_vercmp_corpus', 'corpus',
output: 'corpus', output: 'corpus',
command: [gencorpus, 'corpus'], command: [gencorpus, 'corpus'],
) )

View File

@@ -1,12 +0,0 @@
#!/bin/bash
# this script is a temporary workaround for not having a proper clippy-json target
source /etc/profile
cd build || exit $?
# compile as far as we can
ninja
ninja clippy-json

View File

@@ -1 +0,0 @@
build/rust-project.json

View File

@@ -646,6 +646,14 @@ mod test {
use crate::Parseable; use crate::Parseable;
macro_rules! assert_eq_display {
($a:expr, $b:expr) => {
if $a != $b {
panic!("{} != {}", $a, $b);
}
};
}
macro_rules! assert_cmp_display { macro_rules! assert_cmp_display {
($a:expr, $b:expr, $ordering:expr) => { ($a:expr, $b:expr, $ordering:expr) => {
if $a.cmp(&$b) != $ordering { if $a.cmp(&$b) != $ordering {
@@ -762,7 +770,6 @@ mod test {
.parse_finished(InputIter::new("1.2.0a_alpha1_beta2-r1-8")) .parse_finished(InputIter::new("1.2.0a_alpha1_beta2-r1-8"))
.unwrap(); .unwrap();
#[allow(clippy::single_element_loop)]
for (version_str, expected) in [("1.2.0", Ordering::Greater)] { for (version_str, expected) in [("1.2.0", Ordering::Greater)] {
let version = Version::parser() let version = Version::parser()
.parse_finished(InputIter::new(version_str)) .parse_finished(InputIter::new(version_str))