Skip to content

Commit

Permalink
check
Browse files Browse the repository at this point in the history
  • Loading branch information
databasedav committed Nov 16, 2024
1 parent 0de2505 commit c14708c
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 41 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/pr_previews.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
# generated by nickel/pr_previews.ncl; do not manually edit
jobs:
build_examples:
name: build_examples
needs: get_examples
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v4
with:
submodules: true
- name: install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: install bevy dependencies
run: sudo apt-get update && sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev
shell: bash
- name: populated target directory from cache
uses: Leafwing-Studios/cargo-cache@v2
with:
sweep-cache: true
- name: install just
uses: extractions/setup-just@v2
- name: install binstall
uses: cargo-bins/cargo-binstall@main
- name: install trunk
run: |-
wget https://github.com/databasedav/trunk/releases/download/v0.0.1/trunk
chmod +x trunk
mv trunk /usr/local/bin
- name: install build dependencies
run: cargo binstall --no-confirm wasm-bindgen-cli wasm-opt nickel-lang-cli
- name: build example
run: just build_wasm_example ${{ matrix.example }}
- name: upload dist
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.example }}
path: dist
strategy:
matrix:
example: ${{ fromJson(needs.get_examples.outputs.examples) }}
get_examples:
name: get_examples
outputs:
Expand Down
82 changes: 41 additions & 41 deletions nickel/pr_previews.ncl
Original file line number Diff line number Diff line change
Expand Up @@ -23,47 +23,47 @@ let { uppercase_fields, sync_name_field, run_on_ubuntu_latest, name_id, .. } = i
} |> name_id
]
},
# build_examples = {
# needs = "get_examples",
# strategy = {
# matrix = {
# example = "${{ fromJson(needs.get_examples.outputs.examples) }}"
# }
# },
# steps = [
# checkout,
# rust_toolchain & { with = { targets = "wasm32-unknown-unknown" } },
# bevy_dependencies,
# cached_target_populate,
# just,
# binstall,
# # TODO: just add to binstall once https://github.com/trunk-rs/trunk/pull/915 released
# {
# name = "install trunk",
# run = m%"
# wget https://github.com/databasedav/trunk/releases/download/v0.0.1/trunk
# chmod +x trunk
# mv trunk /usr/local/bin
# "%
# },
# {
# name = "install build dependencies",
# run = "cargo binstall --no-confirm wasm-bindgen-cli wasm-opt nickel-lang-cli",
# },
# {
# name = "build example",
# run = "just build_wasm_example ${{ matrix.example }}"
# },
# {
# name = "upload dist",
# uses = "actions/upload-artifact@v4",
# with = {
# path = "dist",
# name = "${{ matrix.example }}",
# }
# },
# ]
# },
build_examples = {
needs = "get_examples",
strategy = {
matrix = {
example = "${{ fromJson(needs.get_examples.outputs.examples) }}"
}
},
steps = [
checkout,
rust_toolchain & { with = { targets = "wasm32-unknown-unknown" } },
bevy_dependencies,
cached_target_populate,
just,
binstall,
# TODO: just add to binstall once https://github.com/trunk-rs/trunk/pull/915 released
{
name = "install trunk",
run = m%"
wget https://github.com/databasedav/trunk/releases/download/v0.0.1/trunk
chmod +x trunk
mv trunk /usr/local/bin
"%
},
{
name = "install build dependencies",
run = "cargo binstall --no-confirm wasm-bindgen-cli wasm-opt nickel-lang-cli",
},
{
name = "build example",
run = "just build_wasm_example ${{ matrix.example }}"
},
{
name = "upload dist",
uses = "actions/upload-artifact@v4",
with = {
path = "dist",
name = "${{ matrix.example }}",
}
},
]
},
# deployment_comment = {
# needs = ["get_examples", "deploy_examples"],
# steps = [
Expand Down

0 comments on commit c14708c

Please sign in to comment.