Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b96cbc5
enabled hdf feature for testing build
CramBL Jan 15, 2025
4d1441c
disable static linking crt on windows for testing
CramBL Jan 15, 2025
82c48b1
try remove hdf5 static feature
CramBL Jan 17, 2025
38563b9
Merge branch 'master' into test-enable-hdf-feature
CramBL Feb 1, 2025
ac81f73
install hdf5 in check step
CramBL Feb 1, 2025
a192397
add hdf5 installs to test job
CramBL Feb 1, 2025
99154c8
use msi to install hdf5 on windows
CramBL Feb 1, 2025
27d4261
install hdf5 headers for lint job
CramBL Feb 1, 2025
bcce29c
add inits for hdf5 headers and move init recipes to init.just
CramBL Feb 1, 2025
57c7bf1
use just for init recipes
CramBL Feb 1, 2025
8f5abb4
set github env vars if the github env var is set to true
CramBL Feb 1, 2025
3794bac
set just module
CramBL Feb 1, 2025
905c14c
use unzip instead of 7z
CramBL Feb 1, 2025
696640e
run the MSI installer in a separate step to ensure it's run through p…
CramBL Feb 1, 2025
c77a303
forgot to set msi installer path
CramBL Feb 1, 2025
ad40dcf
set just module
CramBL Feb 1, 2025
08d8c52
powershell style
CramBL Feb 1, 2025
6929db1
run msiexec directly and not through just
CramBL Feb 1, 2025
573079b
resolve MSI_PATH to absolute path
CramBL Feb 1, 2025
215bda0
hardcode path
CramBL Feb 1, 2025
42a696f
ls directory contents
CramBL Feb 1, 2025
b482db3
list contents
CramBL Feb 1, 2025
58eba0c
tweak
CramBL Feb 1, 2025
e96a9b0
dont set MSI_PATH
CramBL Feb 1, 2025
181ed3e
simplify
CramBL Feb 1, 2025
9f866d7
tweak
CramBL Feb 1, 2025
ad4d46b
add build-setup for installing hdf headers
CramBL Feb 1, 2025
22c512d
set runners for macos archs
CramBL Feb 1, 2025
8d509c0
remove superfluous builds
CramBL Feb 1, 2025
b6ee73c
re-enable static vsCRT linking
CramBL Feb 1, 2025
b2dfd6f
minimal main
CramBL Feb 1, 2025
107e3f5
tweak
CramBL Feb 1, 2025
bd8a159
tweaks
CramBL Feb 1, 2025
ed6ca99
fmt
CramBL Feb 1, 2025
c77ecbc
lockfile
CramBL Feb 1, 2025
8ed85f9
build another binary alongside with hdf5 features
CramBL Feb 1, 2025
e1b4d7e
wip
CramBL Feb 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 20 additions & 78 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ env:
RUSTDOCFLAGS: -D warnings
RUST_BACKTRACE: 1
RUST_LOG: debug
JUST_VERBOSE: 1
JUST_COLOR: always

jobs:
check:
Expand All @@ -42,6 +44,7 @@ jobs:
with:
targets: ${{matrix.TARGET}}
- uses: Swatinem/rust-cache@v2
- run: sudo apt-get update && sudo apt-get install libhdf5-dev
- run: cargo check ${{matrix.flags}} --target ${{matrix.TARGET}}

audit:
Expand Down Expand Up @@ -70,8 +73,22 @@ jobs:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@nextest
- uses: extractions/setup-just@v2
- uses: Swatinem/rust-cache@v2
- run: cargo nextest run --workspace --profile ci

- name: Install HDF5
shell: bash
run: just init::install-hdf5-headers

- name: Run MSI installer (windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
cd just\hdf
msiexec /i HDF5-1.14.0-win64.msi /quiet /qn /norestart

- name: Run tests
run: cargo nextest run --workspace --profile ci

format:
runs-on: ubuntu-latest
Expand All @@ -91,6 +108,7 @@ jobs:
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: sudo apt-get update && sudo apt-get install libhdf5-dev
- name: Lint native
run: cargo clippy --workspace --all-features -- -D warnings -W clippy::all
- name: Lint WASM
Expand All @@ -112,84 +130,8 @@ jobs:
- name: Build
run: ./trunk build

build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
# macos-latest seems to already run on arm64(=aarch64):
# https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job#standard-github-hosted-runners-for-public-repositories
TARGET: aarch64-apple-darwin

- os: macos-13
TARGET: x86_64-apple-darwin
# even though the runner uses arm64, MacOS on arm64 seems to support building for amd64.
# which makes sense, would be bad for devs otherwise.
cross: false

- os: ubuntu-latest
TARGET: aarch64-unknown-linux-gnu
cross: true

- os: ubuntu-latest
TARGET: armv7-unknown-linux-gnueabihf
cross: true

- os: ubuntu-latest
TARGET: x86_64-unknown-linux-gnu

- os: windows-latest
TARGET: x86_64-pc-windows-msvc
EXTENSION: .exe

steps:
- name: Install cross
# Github doesnt have runners with exotic architectures (eg. arm64/aarch64 on anything but macos).
# Thus we use cross.
# It's necessary to use an up-to-date cross from the git repository to avoid glibc problems on linux
# Ref: https://github.com/cross-rs/cross/issues/1510
if: matrix.cross
run: |
echo "Resetting RUSTFLAGS as a temporary fix for: https://github.com/cross-rs/cross/issues/1561"
RUSTFLAGS="" cargo install cross --git https://github.com/cross-rs/cross --rev 1b8cf50d20180c1a394099e608141480f934b7f7

- name: Building ${{ matrix.TARGET }}
run: echo "${{ matrix.TARGET }}"

- uses: actions/checkout@master

- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.TARGET }}

- uses: Swatinem/rust-cache@v2
with:
# this is required to avoid failures due to caching of artifacts for different architectures
# The reason is the potential usage of cross.
# The cache checks the rustc host which doesn't record us targeting
# different architectures (and native) with cross on the generic ubuntu-latest.
key: ${{ matrix.TARGET }}

- if: ${{ !matrix.cross }}
name: Cargo Build
run: cargo build --verbose --release --target=${{ matrix.TARGET }}

- if: matrix.cross
name: Cross Build
run: cross build --verbose --release --target=${{ matrix.TARGET }}

- name: Rename
run: cp target/${{ matrix.TARGET }}/release/${{ github.event.repository.name }}${{ matrix.EXTENSION }} ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}

- uses: actions/upload-artifact@master
with:
name: ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}
path: ${{ github.event.repository.name }}-${{ matrix.TARGET }}${{ matrix.EXTENSION }}

tag-release:
needs: [check, audit, test, format, lint, trunk, build]
needs: [check, audit, test, format, lint, trunk]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && success()
permissions:
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/build-setup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- name: Install Just
uses: extractions/setup-just@v2
- name: Install HDF5
shell: bash
run: just init::install-hdf5-headers

- name: Run MSI installer (windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
cd just\hdf
msiexec /i HDF5-1.14.0-win64.msi /quiet /qn /norestart
11 changes: 11 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,17 @@ jobs:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
fi
- name: "Install Just"
uses: "extractions/setup-just@v2"
- name: "Install HDF5"
run: "just init::install-hdf5-headers"
shell: "bash"
- name: "Run MSI installer (windows)"
if: "runner.os == 'Windows'"
run: |
cd just\hdf
msiexec /i HDF5-1.14.0-win64.msi /quiet /qn /norestart
shell: "pwsh"
- uses: swatinem/rust-cache@v2
with:
key: ${{ join(matrix.targets, '-') }}
Expand Down
35 changes: 15 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

97 changes: 25 additions & 72 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
[package]
name = "plotinator3000"
description = "Log viewer app for viewing plots of data from projects such as motor and generator control"
authors = ["SkyTEM Surveys", "Marc Beck KΓΆnig"]
[workspace]
members = ["crates/*"]
resolver = "2"

[workspace.package]
version = "1.6.4"
authors = ["SkyTEM Surveys", "Marc Beck KΓΆnig"]
edition = "2021"
repository = "https://github.com/luftkode/plotinator3000"
homepage = "https://github.com/luftkode/plotinator3000"
license = "MIT OR Apache-2.0"

[package.metadata.wix]
upgrade-guid = "7063C05B-24FE-4CE5-A338-6D750F3F10CE"
path-guid = "025605DB-83DB-4162-B505-26B36C02D0B9"
license = false
eula = false
product-icon = "assets/favicon.ico"


[workspace]
members = ["crates/*"]
description = "Log viewer app for viewing plots of data from projects such as motor and generator control"
homepage = "https://github.com/luftkode/plotinator3000"
repository = "https://github.com/luftkode/plotinator3000"

[workspace.dependencies]
plotinator-lib = { version = "*", path = "crates/plotinator-lib" }
skytem_logs = { version = "*", path = "crates/skytem_logs" }
log_if = { version = "*", path = "crates/log_if" }
plot_util = { version = "*", path = "crates/plot_util" }
skytem_hdf = { version = "*", path = "crates/skytem_hdf" }
eframe = { version = "0.30", default-features = false, features = [
"default_fonts", # Embed the default egui fonts.
"glow", # Use the glow rendering backend. Alternative: "wgpu".
"persistence", # Enable restoring app state when restarting the app.
"wayland",
"x11"
] }
egui = { version = "0.30", features = ["rayon"] }
egui_plot = { version = "0.30", features = ["serde"] }
rfd = "0.15"
egui-phosphor = "0.8.0"
egui-notify = "0.18.0"
tokio = "1.43.0"
log = "0.4"
serde = { version = "1", features = ["derive"] }
serde-big-array = "0.5.1"
Expand All @@ -43,58 +51,6 @@ pretty_assertions = "1.4.1"
tempfile = "3.15.0"
reqwest = "0.12.12"

[dependencies]
skytem_logs = { version = "*", path = "crates/skytem_logs" }
log_if = { version = "*", path = "crates/log_if" }
plot_util = { version = "*", path = "crates/plot_util" }
skytem_hdf = { version = "*", path = "crates/skytem_hdf" }
egui_plot.workspace = true
log.workspace = true
serde.workspace = true
strum.workspace = true
strum_macros.workspace = true
chrono.workspace = true
getset.workspace = true
semver.workspace = true
egui.workspace = true
eframe = { version = "0.30", default-features = false, features = [
"default_fonts", # Embed the default egui fonts.
"glow", # Use the glow rendering backend. Alternative: "wgpu".
"persistence", # Enable restoring app state when restarting the app.
"wayland",
"x11"
] }
rfd = "0.15"
egui-phosphor = "0.8.0"
egui-notify = "0.18.0"
tokio = "1.43.0"

[dev-dependencies]
testresult.workspace = true
tempfile.workspace = true
reqwest.workspace = true

[features]
default = ["selfupdater"]
hdf = []
selfupdater = []

# native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
env_logger = "0.11"
zip = "2.2.2"
axoupdater = { version = "0.9.0", features = ["blocking"] }


# web:
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-bindgen-futures = "0.4"
web-sys = "0.3.70"

# windows
[target.'cfg(target_os = "windows")'.dependencies]
elevated-command.workspace = true

[profile.release]
opt-level = 3
debug = false
Expand All @@ -111,9 +67,6 @@ opt-level = 2
[profile.dist]
inherits = "release"

[lints]
workspace = true

[workspace.lints.rust]
missing_debug_implementations = "warn"
missing_copy_implementations = "warn"
Expand Down
Loading
Loading