Skip to content

Bump edition to 2024 (#96) #174

Bump edition to 2024 (#96)

Bump edition to 2024 (#96) #174

Workflow file for this run

name: Build Template
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
template:
- simple
- simple-async
- component
include:
- template: hello-world
project_name: ratatui-github-example
arguments: ""
- template: simple
project_name: ratatui-github-example
arguments: ""
- template: simple-async
project_name: ratatui-github-example
arguments: ""
- template: event-driven
project_name: ratatui-github-example
arguments: ""
- template: event-driven-async
project_name: ratatui-github-example
arguments: ""
- template: component
project_name: ratatui-github-example
arguments: "--define=gh-username=ratatui --define=project-description=example --define=use-gitserver=false"
env:
PROJECT_NAME: ${{ matrix.project_name }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run cargo generate
uses: cargo-generate/[email protected]
with:
name: ${{ matrix.project_name }}
template: ${{ matrix.template }}
arguments: ${{ matrix.arguments }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cargo check
# we need to move the generated project to a temp folder, away from the template project
# otherwise cargo runs would fail
# see https://github.com/rust-lang/cargo/issues/9922
run: |
mv ${{ env.PROJECT_NAME }} ${{ runner.temp }}/
cd ${{ runner.temp }}/${{ env.PROJECT_NAME }}
cargo check --tests