upgrade to bevy 0.16 #178
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# generated by nickel/pr_previews.ncl; do not manually edit | |
jobs: | |
assert_nickels_synced_: | |
name: assert_nickels_synced_ | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: install nickel | |
run: |- | |
OUT="$HOME/.local/bin/nickel" | |
mkdir -p "$(dirname "$OUT")" | |
curl -L "https://github.com/tweag/nickel/releases/download/1.12.2/nickel-pkg-x86_64-linux" -o "$OUT" | |
chmod +x "$OUT" | |
echo "$(dirname "$OUT")" >> "$GITHUB_PATH" | |
nickel --version | |
- name: install just | |
uses: extractions/setup-just@v2 | |
- name: assert nickels synced | |
run: |- | |
just sync_nickels | |
[[ -n $(git status --porcelain) ]] && echo 'nickels are not synced; run `just format_nickels sync_nickels`' && exit 1 || exit 0 | |
build_examples_: | |
name: build_examples_ | |
needs: get_examples_ | |
strategy: | |
matrix: | |
api: | |
- webgl2 | |
- webgpu | |
example: ${{ fromJson(needs.get_examples_.outputs.examples) }} | |
uses: ./.github/workflows/build_example.yaml | |
with: | |
api: ${{ matrix.api }} | |
example: ${{ matrix.example }} | |
deploy_examples_: | |
name: deploy_examples_ | |
needs: build_examples_ | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: remove gitignore | |
run: rm .gitignore | |
- name: download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path: artifacts | |
- name: organize artifacts | |
run: |- | |
for artifact in artifacts/*; do | |
dirname=$(basename "$artifact") | |
api=${dirname%%_*} | |
example=${dirname#*_} | |
mkdir -p "pages/$api/$example" | |
mv "$artifact"/* "pages/$api/$example" | |
done | |
- name: deploy | |
uses: JamesIves/github-pages-deploy-action@v4.7.3 | |
with: | |
attempt-limit: 100 | |
commit-message: https://github.com/databasedav/haalka/pull/${{ github.event.number }}/commits/${{ github.event.pull_request.head.sha }} | |
folder: pages | |
force: false | |
target-folder: pr_previews/${{ github.event.number }} | |
deployment_comment: | |
name: deployment_comment | |
needs: | |
- get_examples_ | |
- deploy_examples_ | |
permissions: | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- id: deployment_timestamp | |
name: deployment_timestamp | |
run: |- | |
timestamp=$(date -u +'%Y-%m-%dT%H:%M:%SZ') | |
echo "timestamp=$timestamp" | |
echo "timestamp=$timestamp" >> $GITHUB_OUTPUT | |
- id: links_markdown_list | |
name: links_markdown_list | |
run: |- | |
examples='${{ needs.get_examples_.outputs.examples }}' | |
base_url="https://databasedav.github.io/haalka/pr_previews/${{ github.event.number }}" | |
markdown_list="" | |
for example in $(echo "${examples}" | jq -r '.[]'); do | |
markdown_list="${markdown_list}- $example: [webgl2](${base_url}/webgl2/${example}) [webgpu](${base_url}/webgpu/${example})"$'\n' | |
done | |
echo "markdown_list=$markdown_list" | |
{ | |
echo "markdown_list<<EOF" | |
echo "$markdown_list" | |
echo "EOF" | |
} >> $GITHUB_OUTPUT | |
- uses: thollander/actions-comment-pull-request@v2 | |
with: | |
comment_tag: preview | |
message: |- | |
**commit:** https://github.com/databasedav/haalka/pull/${{ github.event.number }}/commits/${{ github.event.pull_request.head.sha }} | |
**deployed:** ${{ steps.deployment_timestamp.outputs.timestamp }} | |
**previews:** | |
${{ steps.links_markdown_list.outputs.markdown_list }} | |
mode: recreate | |
pr_number: ${{ github.event.number }} | |
get_examples_: | |
name: get_examples_ | |
needs: assert_nickels_synced_ | |
outputs: | |
examples: ${{ steps.output_examples.outputs.examples }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: install just | |
uses: extractions/setup-just@v2 | |
- id: output_examples | |
name: output_examples | |
run: |- | |
examples=$(just list_examples) | |
echo "examples=$examples" | |
echo "examples=$examples" >> $GITHUB_OUTPUT | |
name: pr_previews | |
on: pull_request |