mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-27 09:54:41 -05:00
* fix: improve CI workflow * fix: add missing `Makefile.toml` to workspace crates (reactive_stores and reactive_stores_macro) * fix: remove trailing slash in workflow names * fix: add gtk example and improve excluding example's logic * fix: install gtk example deps
37 lines
1.0 KiB
YAML
37 lines
1.0 KiB
YAML
name: Get Examples Matrix Call
|
|
on:
|
|
workflow_call:
|
|
outputs:
|
|
matrix:
|
|
description: "Matrix"
|
|
value: ${{ jobs.create.outputs.matrix }}
|
|
jobs:
|
|
create:
|
|
name: Create Examples Matrix
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
env:
|
|
# separate examples using "|" (vertical bar) char like "a|b|c".
|
|
# cargo-make should be excluded by default.
|
|
EXCLUDED_EXAMPLES: cargo-make
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Install jq
|
|
run: sudo apt-get install jq
|
|
- name: Set Matrix
|
|
id: set-matrix
|
|
run: |
|
|
examples=$(ls -1d examples/*/ |
|
|
grep -vE "($EXCLUDED_EXAMPLES)" |
|
|
sed 's/\/$//' |
|
|
jq -R -s -c 'split("\n")[:-1]')
|
|
echo "Example Directories: $examples"
|
|
echo "matrix={\"directory\":$examples}" >> "$GITHUB_OUTPUT"
|
|
- name: Print Location Info
|
|
run: |
|
|
echo "Workspace: ${{ github.workspace }}"
|
|
pwd
|
|
ls | sort -u
|