Skip to content

Commit

Permalink
feat: create caches workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BD103 committed Apr 20, 2024
1 parent f1fbe70 commit 9798709
Showing 1 changed file with 100 additions and 0 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/create-caches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Create Caches

on:
schedule:
# Run at 0:00 daily. (Basically as early as possible.)
- cron: 0 0 * * *
workflow_dispatch:
# TODO: Remove this. It is for testing purposes only.
pull_request:

jobs:
build:
name: Build
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
toolchain: [stable]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}

- name: Build workspace
run: cargo build --workspace

- name: Save cache
uses: ./.github/actions/cache
with:
kind: build
toolchain: ${{ matrix.toolchain }}
action: save

check:
name: Check
strategy:
matrix:
include:
- os: ubuntu-latest
toolchain: nightly
target: default
- os: macos-latest
toolchain: nightly
target: default
- os: ubuntu-latest
toolchain: stable
target: wasm
- os: ubuntu-latest
toolchain: nightly
target: wasm-atomics
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}

- name: Build workspace
run: cargo check --workspace

- name: Save cache
uses: ./.github/actions/cache
with:
kind: check
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
action: save

doc:
name: Doc
strategy:
matrix:
os: [ubuntu-latest]
toolchain: [nightly]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}

- name: Build workspace
run: cargo doc -p bevy --no-deps

- name: Save cache
uses: ./.github/actions/cache
with:
kind: doc
toolchain: ${{ matrix.toolchain }}
action: save

0 comments on commit 9798709

Please sign in to comment.