From 1b7ddf631b0b128a3663436fd1d92514d6776787 Mon Sep 17 00:00:00 2001 From: "Guillaume W. Bres" Date: Mon, 19 Aug 2024 11:52:24 +0200 Subject: [PATCH 1/6] Prepare for 0.17.0-alpha Signed-off-by: Guillaume W. Bres --- crx2rnx/Cargo.toml | 4 ++-- qc-traits/Cargo.toml | 2 +- rinex-cli/Cargo.toml | 8 ++++---- rinex-qc/Cargo.toml | 8 ++++---- rinex/Cargo.toml | 4 ++-- rnx2crx/Cargo.toml | 4 ++-- sp3/Cargo.toml | 4 ++-- ublox-rnx/Cargo.toml | 4 ++-- 8 files changed, 19 insertions(+), 19 deletions(-) diff --git a/crx2rnx/Cargo.toml b/crx2rnx/Cargo.toml index 040a0ce51..36a9cf649 100644 --- a/crx2rnx/Cargo.toml +++ b/crx2rnx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "crx2rnx" -version = "2.3.4" +version = "2.4.0" license = "MIT OR Apache-2.0" authors = ["Guillaume W. Bres "] description = "RINEX data decompressor" @@ -12,4 +12,4 @@ readme = "README.md" [dependencies] clap = { version = "4.4.13", features = ["derive", "color"] } -rinex = { path = "../rinex", version = "=0.16.1", features = ["serde"] } +rinex = { path = "../rinex", version = "=0.17.0-alpha", features = ["serde"] } diff --git a/qc-traits/Cargo.toml b/qc-traits/Cargo.toml index 4f677882d..e00c60acf 100644 --- a/qc-traits/Cargo.toml +++ b/qc-traits/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rinex-qc-traits" -version = "0.1.1" +version = "0.2.0" license = "MIT OR Apache-2.0" authors = ["Guillaume W. Bres "] description = "RINEX quality analysis specific traits" diff --git a/rinex-cli/Cargo.toml b/rinex-cli/Cargo.toml index dbd2a85c9..1680acd79 100644 --- a/rinex-cli/Cargo.toml +++ b/rinex-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rinex-cli" -version = "0.11.1" +version = "0.12.0-alpha" license = "MIT OR Apache-2.0" authors = ["Guillaume W. Bres "] description = "Command line tool parse and analyze RINEX data" @@ -53,6 +53,6 @@ cggtts = { version = "4.1.5", features = ["serde", "scheduler"], optional = true # cggtts = { path = "../../cggtts/cggtts", features = ["serde", "scheduler"], optional = true } # cggtts = { git = "https://github.com/gwbres/cggtts", branch = "main", features = ["serde", "scheduler"], optional = true } -rinex = { path = "../rinex", version = "=0.16.1", features = ["full"] } -sp3 = { path = "../sp3", version = "=1.0.8", features = ["serde", "flate2"] } -rinex-qc = { path = "../rinex-qc", version = "=0.1.14", features = ["sp3"] } +rinex = { path = "../rinex", version = "=0.17.0-alpha", features = ["full"] } +sp3 = { path = "../sp3", version = "=1.1.0-alpha", features = ["serde", "flate2"] } +rinex-qc = { path = "../rinex-qc", version = "=0.2.0-alpha", features = ["sp3"] } diff --git a/rinex-qc/Cargo.toml b/rinex-qc/Cargo.toml index fbeecc613..798dba628 100644 --- a/rinex-qc/Cargo.toml +++ b/rinex-qc/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rinex-qc" -version = "0.1.14" +version = "0.2.0-alpha" license = "MIT OR Apache-2.0" authors = ["Guillaume W. Bres "] description = "RINEX and more broadly, GNSS data processing" @@ -49,10 +49,10 @@ plotly = { git = "https://github.com/gwbres/plotly", branch = "scattergeo"} hifitime = "4.0.0-alpha" gnss-rs = { version = "2.2.1", features = ["serde"] } -rinex = { path = "../rinex", version = "=0.16.1", features = ["full"] } -rinex-qc-traits = { path = "../qc-traits", version = "=0.1.1", features = ["processing"] } +rinex = { path = "../rinex", version = "=0.17.0-alpha", features = ["full"] } +rinex-qc-traits = { path = "../qc-traits", version = "=0.2.0", features = ["processing"] } -sp3 = { path = "../sp3", version = "=1.0.8", features = ["qc", "processing", "serde"], optional = true } +sp3 = { path = "../sp3", version = "=1.1.0-alpha", features = ["qc", "processing", "serde"], optional = true } [dev-dependencies] serde_json = "1" diff --git a/rinex/Cargo.toml b/rinex/Cargo.toml index 2c326730d..af4663a5f 100644 --- a/rinex/Cargo.toml +++ b/rinex/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rinex" -version = "0.16.1" +version = "0.17.0-alpha" license = "MIT OR Apache-2.0" authors = ["Guillaume W. Bres "] description = "Package to parse and analyze RINEX data" @@ -115,7 +115,7 @@ gnss-rs = { version = "2.2.1", features = ["serde", "domes", "cospar"] } # RINEX QC dedicated traits maud = { version = "0.26", optional = true } -rinex-qc-traits = { path = "../qc-traits", version = "=0.1.1", optional = true } +rinex-qc-traits = { path = "../qc-traits", version = "=0.2.0", optional = true } [dev-dependencies] serde_json = "1" diff --git a/rnx2crx/Cargo.toml b/rnx2crx/Cargo.toml index 1d446b173..9c32be8ec 100644 --- a/rnx2crx/Cargo.toml +++ b/rnx2crx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rnx2crx" -version = "1.2.4" +version = "1.3.0" license = "MIT OR Apache-2.0" authors = ["Guillaume W. Bres "] description = "RINEX data compressor" @@ -14,4 +14,4 @@ readme = "README.md" [dependencies] thiserror = "1" clap = { version = "4.4.13", features = ["derive", "color"] } -rinex = { path = "../rinex", version = "=0.16.1", features = ["serde"] } +rinex = { path = "../rinex", version = "=0.17.0-alpha", features = ["serde"] } diff --git a/sp3/Cargo.toml b/sp3/Cargo.toml index 6a5070d02..054eb5c69 100644 --- a/sp3/Cargo.toml +++ b/sp3/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sp3" -version = "1.0.8" +version = "1.1.0-alpha" license = "MIT OR Apache-2.0" authors = ["Guillaume W. Bres "] description = "IGS SP3 file parser" @@ -38,7 +38,7 @@ map_3d = "0.1.5" itertools = "0.13.0" hifitime = "4.0.0-alpha" gnss-rs = { version = "2.2.1", features = ["serde"] } -rinex-qc-traits = { path = "../qc-traits", version = "=0.1.1", optional = true } +rinex-qc-traits = { path = "../qc-traits", version = "=0.2", optional = true } serde = { version = "1.0", optional = true, default-features = false, features = ["derive"] } flate2 = { version = "1.0.24", optional = true, default-features = false, features = ["zlib"] } diff --git a/ublox-rnx/Cargo.toml b/ublox-rnx/Cargo.toml index 1939b392d..7b8930246 100644 --- a/ublox-rnx/Cargo.toml +++ b/ublox-rnx/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ublox-rnx" -version = "0.1.7" +version = "0.2.0-alpha" license = "MIT OR Apache-2.0" authors = ["Guillaume W. Bres "] description = "Efficient RINEX production from a Ublox GNSS receiver" @@ -22,4 +22,4 @@ serialport = "4.2.0" ublox = "0.4.4" gnss-rs = { version = "2.2.1", features = ["serde"] } clap = { version = "4.4.10", features = ["derive", "color"] } -rinex = { path = "../rinex", version = "=0.16.1", features = ["serde", "nav", "obs", "clock"] } +rinex = { path = "../rinex", version = "=0.17.0-alpha", features = ["serde", "nav", "obs", "clock"] } From eaa548545c858b02ce7099041d8e6b03ed55b3d5 Mon Sep 17 00:00:00 2001 From: "Guillaume W. Bres" Date: Mon, 19 Aug 2024 20:50:05 +0200 Subject: [PATCH 2/6] Upgrade sv_orbit Signed-off-by: Guillaume W. Bres --- rinex-cli/src/fops/csv.rs | 10 +++--- rinex-cli/src/positioning/orbit.rs | 8 ++--- rinex-qc/src/report/orbit.rs | 52 ++++++++++++++---------------- rinex/src/lib.rs | 25 ++++++++------ rinex/src/navigation/ephemeris.rs | 37 ++++++++++++--------- 5 files changed, 72 insertions(+), 60 deletions(-) diff --git a/rinex-cli/src/fops/csv.rs b/rinex-cli/src/fops/csv.rs index 5b72738dc..409baa12c 100644 --- a/rinex-cli/src/fops/csv.rs +++ b/rinex-cli/src/fops/csv.rs @@ -61,13 +61,15 @@ pub fn write_nav_rinex(obs: &Rinex, brdc: &Rinex, path: &Path) -> Result<(), Err for (sv, _) in svnn.iter() { let sv_str = sv.to_string(); if let Some((toc, _toe, eph)) = brdc.sv_ephemeris(*sv, *t) { - if let Some((x_ecef_km, y_ecef_km, z_ecef_km)) = eph.kepler2position(*sv, toc, *t) { + if let Some(sv_orbit) = eph.kepler2position(*sv, toc, *t) { + let sv_state = sv_orbit.to_cartesian_pos_vel(); + let (x_km, y_km, z_km) = (sv_state[0], sv_state[1], sv_state[2]); orbit_w.write_record(&[ &t_str, &sv_str, - &format!("{:.3E}", x_ecef_km), - &format!("{:.3E}", y_ecef_km), - &format!("{:.3E}", z_ecef_km), + &format!("{:.3E}", x_km), + &format!("{:.3E}", y_km), + &format!("{:.3E}", z_km), ])?; if let Some(correction) = eph.clock_correction(toc, *t, *sv, 8) { clk_w.write_record(&[ diff --git a/rinex-cli/src/positioning/orbit.rs b/rinex-cli/src/positioning/orbit.rs index a958fa3d0..077c54334 100644 --- a/rinex-cli/src/positioning/orbit.rs +++ b/rinex-cli/src/positioning/orbit.rs @@ -169,14 +169,14 @@ impl OrbitSource for Orbits<'_, '_> { }; //precise let keplerian = if let Some((toc, _, eph)) = self.eph.borrow_mut().select(t, sv) { - let (x_km, y_km, z_km) = eph.kepler2position(sv, toc, t)?; + let orbit = eph.kepler2position(sv, toc, t)?; + let state = orbit.to_cartesian_pos_vel(); + let (x_km, y_km, z_km) = (state[0], state[1], state[2]); debug!( "{}({}) keplerian state (ECEF): x={}km,y={}km,z={}km", t, sv, x_km, y_km, z_km ); - Some(Orbit::from_position( - x_km, y_km, z_km, t, fr, // TODO: convert if need be - )) + Some(orbit) } else { None }; diff --git a/rinex-qc/src/report/orbit.rs b/rinex-qc/src/report/orbit.rs index 0e814a906..e96fb6a6f 100644 --- a/rinex-qc/src/report/orbit.rs +++ b/rinex-qc/src/report/orbit.rs @@ -26,7 +26,9 @@ impl BrdcSp3Report { fn new(sp3: &SP3, brdc: &Rinex) -> Self { let mut errors = BTreeMap::>::new(); for (t_sp3, sv_sp3, (sp3_x, sp3_y, sp3_z)) in sp3.sv_position() { - if let Some((brdc_x, brdc_y, brdc_z)) = brdc.sv_position(sv_sp3, t_sp3) { + if let Some(brdc_orb) = brdc.sv_orbit(sv_sp3, t_sp3) { + let brdc_state = brdc_orb.to_cartesian_pos_vel(); + let (brdc_x, brdc_y, brdc_z) = (brdc_state[0], brdc_state[1], brdc_state[2]); let (err_x_m, err_y_m, err_z_m) = ( (brdc_x - sp3_x) * 1000.0, (brdc_y - sp3_y) * 1000.0, @@ -126,7 +128,7 @@ impl Render for BrdcSp3Report { } tr { th class="is-info" { - "X errors" + "Y errors" } td { (self.y_err_plot.render()) @@ -179,6 +181,8 @@ impl OrbitReport { #[cfg(feature = "sp3")] if let Some(sp3) = ctx.sp3() { for (t, sv_sp3, pos_sp3) in sp3.sv_position() { + let rx_orbit = Orbit::from_position(x0_km, y0_km, z0_km, t, ctx.earth_cef); + let (x_sp3_km, y_sp3_km, z_sp3_km) = (pos_sp3.0, pos_sp3.1, pos_sp3.2); if let Ok(el_az_range) = Ephemeris::elevation_azimuth_range( t, @@ -208,31 +212,25 @@ impl OrbitReport { } if brdc_skyplot { let brdc = ctx.brdc_navigation().unwrap(); - if let Some((x_km, y_km, z_km)) = brdc.sv_position(sv_sp3, t) { - if let Ok(el_az_range) = Ephemeris::elevation_azimuth_range( - t, - &ctx.almanac, - ctx.earth_cef, - (x_km, y_km, z_km), - (x0_km, y0_km, z0_km), - ) { - let (el_deg, az_deg) = - (el_az_range.elevation_deg, el_az_range.azimuth_deg); - if let Some(t_brdc) = t_brdc.get_mut(&sv_sp3) { - t_brdc.push(t); - } else { - t_brdc.insert(sv_sp3, vec![t]); - } - if let Some(e) = elev_brdc.get_mut(&sv_sp3) { - e.push(el_deg); - } else { - elev_brdc.insert(sv_sp3, vec![el_deg]); - } - if let Some(a) = azim_brdc.get_mut(&sv_sp3) { - a.push(az_deg); - } else { - azim_brdc.insert(sv_sp3, vec![az_deg]); - } + if let Some(el_az_range) = + brdc.sv_azimuth_elevation_range(sv_sp3, t, rx_orbit, &ctx.almanac) + { + let (el_deg, az_deg) = + (el_az_range.elevation_deg, el_az_range.azimuth_deg); + if let Some(t_brdc) = t_brdc.get_mut(&sv_sp3) { + t_brdc.push(t); + } else { + t_brdc.insert(sv_sp3, vec![t]); + } + if let Some(e) = elev_brdc.get_mut(&sv_sp3) { + e.push(el_deg); + } else { + elev_brdc.insert(sv_sp3, vec![el_deg]); + } + if let Some(a) = azim_brdc.get_mut(&sv_sp3) { + a.push(az_deg); + } else { + azim_brdc.insert(sv_sp3, vec![az_deg]); } } } diff --git a/rinex/src/lib.rs b/rinex/src/lib.rs index 196520e5b..1efe2f387 100644 --- a/rinex/src/lib.rs +++ b/rinex/src/lib.rs @@ -2323,22 +2323,27 @@ impl Rinex { }) })) } - /// Returns SV Orbital state vector (if we can) at specified [Epoch] `t`. - /// Self must be NAV RINEX. Position is expressed as ECEF coordinates [km]. - pub fn sv_position(&self, sv: SV, t: Epoch) -> Option<(f64, f64, f64)> { + /// Returns [SV] [Orbit]al state vector (if we can) at specified [Epoch] `t`. + /// Self must be NAV RINEX. + pub fn sv_orbit(&self, sv: SV, t: Epoch) -> Option { let (toc, _, eph) = self.sv_ephemeris(sv, t)?; eph.kepler2position(sv, toc, t) } - /// Returns SV Orbital state vector and - /// instantaneous velocity (if we can) at specific [Epoch] `t`. - /// Self must be NAV RINEX. All coordinates expressed in ECEF [km] frame. - pub fn sv_position_velocity( + /// Returns [SV] attitude vector (if we can) at specified [Epoch] `t` + /// with respect to specified reference point expressed as an [Orbit]. + /// [Self] must be NAV RINEX. + pub fn sv_azimuth_elevation_range( &self, sv: SV, t: Epoch, - ) -> Option<((f64, f64, f64), (f64, f64, f64))> { - let (toc, _, eph) = self.sv_ephemeris(sv, t)?; - eph.kepler2position_velocity(sv, toc, t) + rx_orbit: Orbit, + almanac: &Almanac, + ) -> Option { + let sv_orbit = self.sv_orbit(sv, t)?; + let azelrange = almanac + .azimuth_elevation_range_sez(sv_orbit, rx_orbit) + .ok()?; + Some(azelrange) } /// Ephemeris selection method. Use this method to select Ephemeris /// for [SV] at [Epoch], to be used in navigation. diff --git a/rinex/src/navigation/ephemeris.rs b/rinex/src/navigation/ephemeris.rs index 08e9f45ca..6df31cb95 100644 --- a/rinex/src/navigation/ephemeris.rs +++ b/rinex/src/navigation/ephemeris.rs @@ -12,8 +12,9 @@ use crate::prelude::Almanac; #[cfg(feature = "nav")] use anise::{ astro::AzElRange, - constants::frames::EARTH_J2000, + constants::frames::{EARTH_J2000, IAU_EARTH_FRAME}, errors::AlmanacResult, + math::{Vector3, Vector6}, prelude::{Frame, Orbit}, }; @@ -27,7 +28,7 @@ use crate::epoch::{ }; #[cfg(feature = "nav")] -use nalgebra::{self as na, Matrix3, Rotation, Rotation3, Vector3, Vector4}; +use nalgebra::{self as na, Matrix3, Rotation, Rotation3, Vector4}; /// Parsing errors #[derive(Debug, Error)] @@ -114,7 +115,7 @@ impl EphemerisHelper { } /// Calculate ecef position [km]. - fn ecef_position(&self) -> Vector3 { + fn ecef_position(&self) -> Vector3 { if self.sv.is_beidou_geo() { self.beidou_geo_ecef_position() } else { @@ -126,7 +127,7 @@ impl EphemerisHelper { } /// Calculate ecef velocity [km/s]. - fn ecef_velocity(&self) -> Vector3 { + fn ecef_velocity(&self) -> Vector3 { if self.sv.is_beidou_geo() { self.beidou_geo_ecef_velocity() } else { @@ -157,12 +158,12 @@ impl EphemerisHelper { /// Calculate ECEF position [km] and velocity [km/s] of MEO/IGSO sv /// # Return /// ( Position(x,y,z),Velecity(x,y,z) ) - fn ecef_pv(&self) -> (Vector3, Vector3) { + fn ecef_pv(&self) -> (Vector3, Vector3) { (self.ecef_position(), self.ecef_velocity()) } /// Calculate ecef [km] position of GEO sv - fn beidou_geo_ecef_position(&self) -> Vector3 { + fn beidou_geo_ecef_position(&self) -> Vector3 { let orbit_xyz = Vector3::new(self.r_sv.0, self.r_sv.1, 0.0); let rotation1 = self.meo_orbit_to_ecef_rotation_matrix(); let rotation2 = self.geo_orbit_to_ecef_rotation_matrix(); @@ -171,7 +172,7 @@ impl EphemerisHelper { } /// Calculate ecef velocity of GEO sv - fn beidou_geo_ecef_velocity(&self) -> Vector3 { + fn beidou_geo_ecef_velocity(&self) -> Vector3 { let (x, y, _) = self.r_sv; let (sin_omega_k, cos_omega_k) = self.omega_k.sin_cos(); let (sin_i_k, cos_i_k) = self.i_k.sin_cos(); @@ -204,7 +205,7 @@ impl EphemerisHelper { /// Calculate ecef position and velocity of BeiDou GEO sv /// # Return /// ( Position(x,y,z),Velecity(x,y,z) ) - fn beidou_geo_ecef_pv(&self) -> (Vector3, Vector3) { + fn beidou_geo_ecef_pv(&self) -> (Vector3, Vector3) { let (x, y, _) = self.r_sv; let (sin_omega_k, cos_omega_k) = self.omega_k.sin_cos(); let (sin_i_k, cos_i_k) = self.i_k.sin_cos(); @@ -235,7 +236,7 @@ impl EphemerisHelper { } /// get ecef position - pub fn position(&self) -> Option> { + pub fn position(&self) -> Option { match self.sv.constellation { Constellation::GPS | Constellation::Galileo => Some(self.ecef_position()), Constellation::BeiDou => { @@ -253,7 +254,7 @@ impl EphemerisHelper { } /// get ecef position and velocity - pub fn position_velocity(&self) -> Option<(Vector3, Vector3)> { + pub fn position_velocity(&self) -> Option<(Vector3, Vector3)> { if self.sv.is_beidou_geo() { Some(self.beidou_geo_ecef_pv()) } else { @@ -770,22 +771,28 @@ impl Ephemeris { Some(Duration::from_seconds(a0 + a1 * dt + a2 * dt.powi(2))) } } - /// Kepler ECEF [km] position solver at [Epoch] t. + /// Returns [SV] [Orbit]al state at t [Epoch]. /// t_sv [Epoch] is the satellite free running clock. /// Self must be correctly selected from navigation record. /// See [Bibliography::AsceAppendix3], [Bibliography::JLe19] and [Bibliography::BeiDouICD] - pub fn kepler2position(&self, sv: SV, t_sv: Epoch, t: Epoch) -> Option<(f64, f64, f64)> { + pub fn kepler2position(&self, sv: SV, t_sv: Epoch, t: Epoch) -> Option { if sv.constellation.is_sbas() || sv.constellation == Constellation::Glonass { - let (pos_x_km, pos_y_km, pos_z_km) = ( + let (x_km, y_km, z_km) = ( self.get_orbit_f64("satPosX")?, self.get_orbit_f64("satPosY")?, self.get_orbit_f64("satPosZ")?, ); - Some((pos_x_km, pos_y_km, pos_z_km)) + // TODO: velocity + integration + Some(Orbit::from_position(x_km, y_km, z_km, t, IAU_EARTH_FRAME)) } else { let helper = self.ephemeris_helper(sv, t_sv, t)?; let pos = helper.ecef_position(); - Some((pos.x, pos.y, pos.z)) + let vel = helper.ecef_velocity(); + Some(Orbit::from_cartesian_pos_vel( + Vector6::new(pos[0], pos[1], pos[2], vel[0], vel[1], vel[2]), + t, + IAU_EARTH_FRAME, + )) } } /// Kepler ECEF [km] position and velocity [km/s] solver at desired instant "t" for given "sv" From 6cdd0825a848682ababfcf9af7a4c388f112a52b Mon Sep 17 00:00:00 2001 From: "Guillaume W. Bres" Date: Tue, 27 Aug 2024 08:57:21 +0200 Subject: [PATCH 3/6] Introducing lib release Signed-off-by: Guillaume W. Bres --- .github/workflows/rust.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ef74c226d..b00502997 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -113,7 +113,7 @@ jobs: run: | cd ${{ matrix.folder }} && cargo clean && cargo update && cargo build ${{ matrix.opts }} - test: + tests: name: Tests runs-on: ubuntu-latest steps: @@ -196,3 +196,33 @@ jobs: with: command: build args: --all-features --release + + release: + name: Release Libraries + runs-on: ubuntu-latest + needs: [linter, build, documentation, windows-build, macos-build] + strategy: + matrix: + include: + - crate: rinex-qc-traits + - crate: rinex + - crate: sp3 + - crate: sinex + - crate: rinex-qc + - crate: ublox-rnx + - crate: rnx2crx + - crate: crx2rnx + - crate: rinex-cli + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Publish + env: + TOKEN: ${{ secrets.CRATES_IO_TOKEN }} + run: | + cargo login $TOKEN + cargo publish -p ${{ matrix.crate }} From b35775ec801117a0d012e365ae14158ec3b6b75d Mon Sep 17 00:00:00 2001 From: "Guillaume W. Bres" Date: Tue, 27 Aug 2024 09:01:01 +0200 Subject: [PATCH 4/6] run on tags as well Signed-off-by: Guillaume W. Bres --- .github/workflows/rust.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b00502997..882f4b835 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -4,6 +4,8 @@ on: push: branches: - main + tags: + - "*" pull_request: branches: - main From 55493177d74119035c49e90e60d9fcb699ebcc54 Mon Sep 17 00:00:00 2001 From: "Guillaume W. Bres" Date: Tue, 27 Aug 2024 09:43:35 +0200 Subject: [PATCH 5/6] test release and release Signed-off-by: Guillaume W. Bres --- .github/workflows/rust.yml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 882f4b835..d68d9ed2f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -199,10 +199,42 @@ jobs: command: build args: --all-features --release + release-test: + name: Release Test + if: ${{ github.ref_type != 'tag' }} + runs-on: ubuntu-latest + needs: [linter, build, documentation, windows-build, macos-build] + strategy: + matrix: + include: + - crate: rinex-qc-traits + - crate: rinex + - crate: sp3 + - crate: sinex + - crate: rinex-qc + - crate: ublox-rnx + - crate: rnx2crx + - crate: crx2rnx + - crate: rinex-cli + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Publish Test + env: + TOKEN: ${{ secrets.CRATES_IO_TOKEN }} + run: | + cargo login $TOKEN + cargo publish -p ${{ matrix.crate }} --allow-dirty --dry-run + release: name: Release Libraries runs-on: ubuntu-latest needs: [linter, build, documentation, windows-build, macos-build] + if: github.ref_type == 'tag' strategy: matrix: include: @@ -227,4 +259,4 @@ jobs: TOKEN: ${{ secrets.CRATES_IO_TOKEN }} run: | cargo login $TOKEN - cargo publish -p ${{ matrix.crate }} + cargo publish -p ${{ matrix.crate }} --allow-dirty From 88699a2276f5ab49bf192aac3a00f94781772b00 Mon Sep 17 00:00:00 2001 From: "Guillaume W. Bres" Date: Tue, 27 Aug 2024 10:06:55 +0200 Subject: [PATCH 6/6] remove test release Signed-off-by: Guillaume W. Bres --- .github/workflows/rust.yml | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d68d9ed2f..7a161bcdf 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -199,37 +199,6 @@ jobs: command: build args: --all-features --release - release-test: - name: Release Test - if: ${{ github.ref_type != 'tag' }} - runs-on: ubuntu-latest - needs: [linter, build, documentation, windows-build, macos-build] - strategy: - matrix: - include: - - crate: rinex-qc-traits - - crate: rinex - - crate: sp3 - - crate: sinex - - crate: rinex-qc - - crate: ublox-rnx - - crate: rnx2crx - - crate: crx2rnx - - crate: rinex-cli - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Publish Test - env: - TOKEN: ${{ secrets.CRATES_IO_TOKEN }} - run: | - cargo login $TOKEN - cargo publish -p ${{ matrix.crate }} --allow-dirty --dry-run - release: name: Release Libraries runs-on: ubuntu-latest