Skip to content

Commit

Permalink
Update dependencies, use Trunk, update CI and deploy.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gohla committed Feb 4, 2024
1 parent c6f57cd commit d5b4020
Show file tree
Hide file tree
Showing 51 changed files with 945 additions and 788 deletions.
3 changes: 0 additions & 3 deletions .cargo/config.toml

This file was deleted.

3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ ij_any_finally_on_new_line = false
ij_rust_keep_blank_lines_in_code = 2
ij_rust_keep_blank_lines_in_declarations = 2
ij_rust_keep_line_breaks = true
ij_rust_preserve_punctuation = true
ij_rust_allow_one_line_match = true


[*.md]
max_line_length = off
Expand Down
29 changes: 0 additions & 29 deletions .github/workflows/build.yml

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: ci

permissions:
contents: read

on:
pull_request:
push:
branches:
- main

jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable]
experimental: [false]
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- uses: Swatinem/rust-cache@v2
- name: build
run: cargo test --no-run --workspace --no-fail-fast --all-features
- name: test (default features)
run: cargo test --workspace --no-fail-fast
- name: test (all features)
run: cargo test --workspace --no-fail-fast --all-features
- name: test (no default features)
run: cargo test --workspace --no-fail-fast --no-default-features
31 changes: 13 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
name: deploy

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
target-wasm/
key: deploy-rust-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: deploy-rust-${{ runner.os }}
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@v2
with:
tool: cargo-binstall
- run: cargo binstall --no-confirm --no-symlinks wasm-bindgen-cli
- run: |
cargo build --package secalc_gui --target wasm32-unknown-unknown --target-dir target-wasm --release
wasm-bindgen --out-dir code/gui/web/wasm_out --target web --no-typescript target-wasm/wasm32-unknown-unknown/release/secalc_gui.wasm
- uses: peaceiris/actions-gh-pages@v3
- name: install trunk, wasm-bindgen-cli
run: cargo binstall --no-confirm --no-symlinks trunk wasm-bindgen-cli
- name: build
run: trunk build --release
- name: deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./code/gui/web
publish_dir: ./package/gui/dist
cname: secalc.gohla.nl
17 changes: 10 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Rust
/target
/target-wasm
**/wasm_out
**/*.rs.bk
# macOS
*.DS_Store

# IntelliJ
/.idea
/*.iml
/.idea/*
*.iml
# Allow sharing of IntelliJ run configurations.
!/.idea/runConfigurations/
!/.idea/runConfigurations/*

# Cargo
/target
12 changes: 5 additions & 7 deletions .run/B all.run.xml → .idea/runConfigurations/B_all.xml

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

12 changes: 5 additions & 7 deletions .run/B gui.run.xml → .idea/runConfigurations/B_gui.xml

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

17 changes: 17 additions & 0 deletions .idea/runConfigurations/B_gui__wasm.xml

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

14 changes: 6 additions & 8 deletions .run/R cli.run.xml → .idea/runConfigurations/R_cli.xml

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

12 changes: 5 additions & 7 deletions .run/R gui.run.xml → .idea/runConfigurations/R_gui.xml

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

19 changes: 19 additions & 0 deletions .idea/runConfigurations/R_gui__wasm.xml

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

14 changes: 6 additions & 8 deletions .run/Cargo update.run.xml → .idea/runConfigurations/Update.xml

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

23 changes: 0 additions & 23 deletions .run/B gui [wasm].run.xml

This file was deleted.

19 changes: 0 additions & 19 deletions .run/R gui [wasm].run.xml

This file was deleted.

Loading

0 comments on commit d5b4020

Please sign in to comment.