Skip to content

fix selectors

fix selectors #30

Workflow file for this run

name: CI
on: [push, pull_request, workflow_dispatch]
permissions:
contents: write
env:
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
with:
command: check
args: --all-features
check_wasm:
name: Check wasm32
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: actions-rs/cargo@v1
with:
command: check
args: --all-features --lib --target wasm32-unknown-unknown
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: sudo apt-get install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev libssl-dev
- uses: actions-rs/cargo@v1
with:
command: test
args: --lib
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
dioxus_build:
name: Dioxus Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
TARGET: web
- os: ubuntu-latest
TARGET: desktop
- os: macos-latest
TARGET: desktop
- os: windows-latest
TARGET: desktop
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Install Dioxus CLI
run: cargo install dioxus-cli
- name: Build for ${{ matrix.TARGET }}
run: dioxus build --release --platform ${{ matrix.TARGET }}
- name: Rename and package
shell: bash
run: |
if [ "${{ matrix.TARGET }}" = "web" ]; then
tar -czvf mylife-web.tar.gz dist
elif [ "${{ matrix.OS }}" = "windows-latest" ]; then
mv target/release/mylife.exe mylife-windows.exe
elif [ "${{ matrix.OS }}" = "macos-latest" ]; then
mv target/release/mylife mylife-macos
else
mv target/release/mylife mylife-linux
fi
- uses: actions/upload-artifact@v3
with:
name: mylife-${{ matrix.TARGET }}-${{ matrix.os }}
path: |
mylife-*
*.tar.gz
- uses: svenstaro/upload-release-action@v2
if: ${{ github.event_name == 'push' }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: mylife-*
file_glob: true
tag: ${{ github.ref }}
prerelease: ${{ !startsWith(github.ref, 'refs/tags/') }}
overwrite: true