Skip to content

some cleanup + fix

some cleanup + fix #42

Workflow file for this run

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
linux:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- name: rustups
run: rustup target add x86_64-unknown-linux-gnu && rustup target add wasm32-unknown-unknown && rustup toolchain install nightly-x86_64-unknown-linux-gnu && rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
- name: cargo
run: cargo install cargo-leptos #&& cargo install --locked trunk
- name: main
run: LEPTOS_WASM_OPT_VERSION=version_119 LEPTOS_SASS_VERSION=1.71.0 cargo leptos build --release
- name: bundle
run: mkdir out && cp target/release/immt out/immt && cp -r target/web out/web && cp main/resources/settings.toml out/settings.toml
- uses: actions/upload-artifact@v4
with:
name: linux
path: out
windows:
runs-on: windows-latest
environment: production
steps:
- uses: actions/checkout@v4
- name: rustups
run: rustup target add x86_64-pc-windows-msvc && rustup target add wasm32-unknown-unknown && rustup toolchain install nightly-x86_64-pc-windows-msvc && rustup component add rust-src --toolchain nightly-x86_64-pc-windows-msvc && rustup default nightly-x86_64-pc-windows-msvc
- name: cargo
run: cargo install cargo-leptos # && cargo install --locked trunk
- name: envvars1
run: echo "RUSTFLAGS=--cfg=web_sys_unstable_apis" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append && echo "LEPTOS_WASM_OPT_VERSION=version_119" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append && echo "LEPTOS_SASS_VERSION=1.71.0" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append # && echo "CARGO_BUILD_TARGET=x86_64-pc-windows-msvc" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append # && echo "IMMT_BUILD_GRAPHS=true" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: windows fix
run: cargo build --release --bin=immt --no-default-features --features=server
- name: windows fix 2
run: Move-Item -Path target\x86_64-pc-windows-msvc\release\immt.exe -Destination target\release\immt.exe
continue-on-error: true
- name: main
run: cargo leptos build --release
- name: bundle
run: md out && Move-Item -Path target\release\immt.exe -Destination out\immt.exe && Move-Item -Path target\web -Destination out\web && Move-Item -Path main\resources\settings.toml -Destination out\settings.toml
- uses: actions/upload-artifact@v4
with:
name: windows
path: out
# mac_x86:
# runs-on: macos-14-large
# environment: production
# steps:
# - uses: actions/checkout@v4
# - name: rustups
# run: rustup target add x86_64-apple-darwin && rustup target add wasm32-unknown-unknown && rustup toolchain install nightly-x86_64-apple-darwin && rustup component add rust-src --toolchain nightly-x86_64-apple-darwin && rustup default nightly-x86_64-apple-darwin #&& rustup component add rust-src --toolchain nightly-aarch64-apple-darwin
# - name: cargo
# run: cargo install cargo-leptos && cargo install --locked trunk
# - name: graphs
# run: cd web/graphs && CARGO_TARGET_DIR=../../target RUSTFLAGS="--cfg=web_sys_unstable_apis" trunk build --features=client --release
# - name: main
# run: IMMT_BUILD_GRAPHS=true cargo leptos build --release
# - name: bundle
# run: mkdir out && cp target/release/immt out/immt && cp -r target/web out/web && cp main/resources/settings.toml out/settings.toml
# - uses: actions/upload-artifact@v4
# with:
# name: mac_x86
# path: out
mac_aarch64:
runs-on: macos-latest
environment: production
steps:
- uses: actions/checkout@v4
- name: rustups
run: rustup target add aarch64-apple-darwin && rustup target add wasm32-unknown-unknown && rustup toolchain install nightly-aarch64-apple-darwin && rustup component add rust-src --toolchain nightly-aarch64-apple-darwin && rustup default nightly-aarch64-apple-darwin
- name: cargo
run: cargo install cargo-leptos # && cargo install --locked trunk
- name: main
run: LEPTOS_WASM_OPT_VERSION=version_119 LEPTOS_SASS_VERSION=1.71.0 cargo leptos build --release
- name: bundle
run: mkdir out && cp target/release/immt out/immt && cp -r target/web out/web && cp main/resources/settings.toml out/settings.toml
- uses: actions/upload-artifact@v4
with:
name: mac_aarch64
path: out