Skip to content

ci: Add caching for Cargo dependencies and Dioxus CLI #4

ci: Add caching for Cargo dependencies and Dioxus CLI

ci: Add caching for Cargo dependencies and Dioxus CLI #4

Workflow file for this run

name: Dioxus Build
on:
push:
branches: [ "**" ] # Run on all branches
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: freenet-core-ci
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Cache Dioxus CLI
uses: actions/cache@v3
with:
path: ~/.cargo/bin/dx
key: ${{ runner.os }}-dioxus-cli
- name: Install Dioxus CLI
run: cargo install dioxus-cli
- name: Build Dioxus Project
run: |
cd ui
dx build