update workflow
This commit is contained in:
parent
662ea67aa0
commit
32dabe0a24
3 changed files with 26 additions and 25 deletions
28
.github/workflows/rust.yml
vendored
28
.github/workflows/rust.yml
vendored
|
@ -11,19 +11,35 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- 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
|
- name: Build
|
||||||
run: cargo build --verbose
|
run: cargo build --release
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: cargo test --verbose
|
run: cargo test --verbose
|
||||||
|
|
||||||
- name: Check formatting
|
- name: Upload artifacts
|
||||||
run: cargo fmt -- --check
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ runner.os }}-binary
|
||||||
|
path: |
|
||||||
|
target/release/*.exe
|
||||||
|
target/release/*
|
||||||
|
!target/release/*.d
|
||||||
|
!target/release/*.pdb
|
||||||
|
|
||||||
|
|
||||||
- name: Clippy
|
|
||||||
run: cargo clippy -- -D warnings
|
|
|
@ -4,4 +4,4 @@ version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
floem = "0.2.0"
|
|
||||||
|
|
|
@ -1,18 +1,3 @@
|
||||||
use floem::{prelude::*, style::Style};
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
floem::launch(counter_view);
|
println!("editor")
|
||||||
}
|
|
||||||
|
|
||||||
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))
|
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue