Skip to content

Commit ab16fe5

Browse files
authored
Prototype Rust implementation using Bevy (#3)
* 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
1 parent d18bdc9 commit ab16fe5

26 files changed

+4772
-76
lines changed

.github/workflows/build-docs-deploy.yaml

Lines changed: 0 additions & 72 deletions
This file was deleted.

.github/workflows/deploy.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: deploy
2+
# Controls when the workflow will run
3+
on:
4+
# Triggers the workflow when build workflow succeeds but only for the "main" branch
5+
workflow_run:
6+
workflows: [ "python" ]
7+
types: [ "completed" ]
8+
branches: [ "main" ]
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch: {}
11+
12+
jobs:
13+
docs:
14+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
15+
permissions:
16+
pages: write # to deploy to Pages
17+
id-token: write # to verify the deployment originates from an appropriate source
18+
# Deploy to the github-pages environment
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
22+
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v3
26+
with:
27+
fetch-depth: 0
28+
- uses: actions/download-artifact@v3
29+
with:
30+
name: site
31+
path: site
32+
- name: Upload Pages artifact
33+
uses: actions/upload-pages-artifact@v2
34+
with:
35+
path: site
36+
- name: Deploy to GitHub Pages
37+
id: deployment
38+
uses: actions/deploy-pages@v2

.github/workflows/python.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: python
2+
# Controls when the workflow will run
3+
on:
4+
# Triggers the workflow on push or pull request events but only for the "main" branch
5+
push:
6+
branches: [ "main" ]
7+
pull_request:
8+
branches: [ "main" ]
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch: {}
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
- name: Setup Python
21+
uses: actions/setup-python@v3
22+
- run: pip install poetry
23+
- run: poetry build
24+
docs:
25+
needs:
26+
- build
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v3
31+
with:
32+
fetch-depth: 0
33+
- name: Setup Python
34+
uses: actions/setup-python@v3
35+
- run: pip install poetry
36+
- run: poetry install --with dev,docs
37+
- name: Export notebooks as examples
38+
run: poetry run make ipynb2md
39+
- name: MkDocs build
40+
run: poetry run mkdocs build
41+
- uses: actions/upload-artifact@v3
42+
with:
43+
name: site
44+
path: site

.github/workflows/rust.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: rust
2+
# Controls when the workflow will run
3+
on:
4+
# Triggers the workflow on push or pull request events but only for the "main" branch
5+
push:
6+
branches: [ "main" ]
7+
pull_request:
8+
branches: [ "main" ]
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch: {}
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
- name: Install stable toolchain
21+
uses: actions-rs/toolchain@v1
22+
with:
23+
profile: minimal
24+
toolchain: stable
25+
- name: Install Dependencies
26+
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
27+
- name: Build
28+
uses: actions-rs/cargo@v1
29+
with:
30+
command: build
31+
args: --release --all-features
32+
test:
33+
needs: build
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout
37+
uses: actions/checkout@v3
38+
with:
39+
fetch-depth: 0
40+
- name: Install stable toolchain
41+
uses: actions-rs/toolchain@v1
42+
with:
43+
profile: minimal
44+
toolchain: stable
45+
- name: Install Dependencies
46+
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
47+
- name: Test
48+
uses: actions-rs/cargo@v1
49+
with:
50+
command: test
51+
lint:
52+
needs: build
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v3
57+
with:
58+
fetch-depth: 0
59+
- name: Install clippy
60+
uses: actions-rs/toolchain@v1
61+
with:
62+
profile: minimal
63+
toolchain: stable
64+
components: clippy
65+
- name: Install Dependencies
66+
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
67+
- name: Lint
68+
uses: actions-rs/cargo@v1
69+
with:
70+
command: clippy
71+
args: --all-features

0 commit comments

Comments
 (0)