From 93eeec76e9e366a0a0c973d2f1491726f4c46f10 Mon Sep 17 00:00:00 2001 From: Caznix Date: Sun, 1 Dec 2024 18:06:27 -0500 Subject: [PATCH] update workflow --- .github/workflows/rust.yml | 32 ++++++++++++++++++++++++-------- editor/Cargo.toml | 2 +- editor/src/main.rs | 17 +---------------- 3 files changed, 26 insertions(+), 25 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d4c3ccb..8c7a87b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,19 +11,35 @@ env: jobs: build: - runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + target: x86_64-unknown-linux-gnu + - name: Build - run: cargo build --verbose + run: cargo build --release - name: Run tests run: cargo test --verbose - - - name: Check formatting - run: cargo fmt -- --check - - - name: Clippy - run: cargo clippy -- -D warnings \ No newline at end of file + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: ${{ runner.os }}-binary + path: | + target/release/*.exe + target/release/* + !target/release/*.d + !target/release/*.pdb + + \ No newline at end of file diff --git a/editor/Cargo.toml b/editor/Cargo.toml index 800cdbe..f584ecb 100644 --- a/editor/Cargo.toml +++ b/editor/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" edition = "2021" [dependencies] -floem = "0.2.0" + diff --git a/editor/src/main.rs b/editor/src/main.rs index e1a1530..6bd4269 100644 --- a/editor/src/main.rs +++ b/editor/src/main.rs @@ -1,18 +1,3 @@ -use floem::{prelude::*, style::Style}; - fn main() { - floem::launch(counter_view); -} - -fn counter_view() -> impl IntoView { - let mut counter = RwSignal::new(20); - v_stack({ - label("test") - }).style(Style::d); - h_stack(( - button("Increment").action(move || counter += 1), - label(move || format!("Value: {counter}")), - button("Decrement").action(move || counter -= 1), - )) - .style(|s| s.size_full().items_center().justify_center().gap(10)) + println!("editor") } \ No newline at end of file