Skip to content

Commit

Permalink
Prototype Rust implementation using Bevy (#3)
Browse files Browse the repository at this point in the history
* new project from krabmaga template

* start replacing boilerplate

* delete boilerplate

* ecs or bust

* hello bevy

* update docs

* build rust workflow

* better workflow

* even better workflows

* the best workflows

* the bestest workflows

* decent workflows

* final_final_new_final_new_v2
  • Loading branch information
philiplinden authored Dec 10, 2023
1 parent d18bdc9 commit ab16fe5
Show file tree
Hide file tree
Showing 26 changed files with 4,772 additions and 76 deletions.
72 changes: 0 additions & 72 deletions .github/workflows/build-docs-deploy.yaml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: deploy
# Controls when the workflow will run
on:
# Triggers the workflow when build workflow succeeds but only for the "main" branch
workflow_run:
workflows: [ "python" ]
types: [ "completed" ]
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch: {}

jobs:
docs:
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v3
with:
name: site
path: site
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: site
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
44 changes: 44 additions & 0 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: python
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch: {}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v3
- run: pip install poetry
- run: poetry build
docs:
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@v3
- run: pip install poetry
- run: poetry install --with dev,docs
- name: Export notebooks as examples
run: poetry run make ipynb2md
- name: MkDocs build
run: poetry run mkdocs build
- uses: actions/upload-artifact@v3
with:
name: site
path: site
71 changes: 71 additions & 0 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: rust
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch: {}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Install Dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features
test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: Install Dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
lint:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install clippy
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
- name: Install Dependencies
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Lint
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all-features
Loading

0 comments on commit ab16fe5

Please sign in to comment.