27 running examples via cli #240
Workflow file for this run
This file contains 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
name: CI | |
on: | |
pull_request: | |
push: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ci: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-ci-${{ hashFiles('**/Cargo.toml') }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rustfmt, clippy | |
override: true | |
- name: CI job | |
run: cargo run -p ci | |
working-directory: ./tools/ci | |
- name: Ensure docs compile | |
run: cargo doc --no-deps -p dexterous_developer | |
env: | |
RUSTDOCFLAGS: -Dwarnings | |
build-tester: | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-tests-${{ hashFiles('**/Cargo.toml') }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rustfmt, clippy | |
override: true | |
- if: ${{ matrix.os == 'windows-latest' }} | |
name: Add Binutils | |
run: cargo install -f cargo-binutils | |
- if: ${{ matrix.os == 'windows-latest' }} | |
name: Add llvm | |
run: rustup component add llvm-tools-preview | |
- if: ${{ matrix.os == 'macos-latest' }} | |
name: Install LLVM | |
run: brew install llvm | |
- if: ${{ matrix.os == 'ubuntu-latest' }} | |
name: Dependencies | |
run: sudo apt-get update && sudo apt-get install g++ pkg-config libx11-dev libasound2-dev libudev-dev clang lld | |
- name: Build CLI | |
run: cargo build -p dexterous_developer_cli | |
- name: Build Tester | |
run: cargo build | |
working-directory: ./testing/dexterous_developer_tests | |
- name: Store CLI | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{matrix.os}}-cli | |
path: target/debug/dexterous_developer_cli${{ matrix.os == 'windows-latest' && '.exe' || '' }} | |
- name: Store Tester | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{matrix.os}}-tester | |
path: testing/dexterous_developer_tests/target/debug/run_tests${{ matrix.os == 'windows-latest' && '.exe' || '' }} | |
cross-builds: | |
needs: build-tester | |
strategy: | |
matrix: | |
builder: | |
- ubuntu-latest | |
target: | |
- os: macos-latest | |
target: mac | |
- os: windows-latest | |
target: windows | |
runs-on: ${{matrix.builder}} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-tests-${{ hashFiles('**/Cargo.toml') }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rustfmt, clippy | |
override: true | |
- run: mkdir bins | |
- name: Download CLI | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{matrix.builder}}-cli | |
path: ${{github.workspace}}/bins | |
- name: Set Executable | |
run: chmod +x ./bins/* | |
- run: ${{github.workspace}}/bins/dexterous_developer_cli install-cross ${{matrix.target.target}} --macos-sdk-url ${{secrets.MAC_SDK_URL}} | |
- run: ${{github.workspace}}/bins/dexterous_developer_cli compile-libs --target ${{matrix.target.target}} ${{github.workspace}}/libs | |
working-directory: testing/templates/simple_cli_test | |
env: | |
RUST_LOG: dexterous_developer_internal=trace | |
- name: Store Libs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{matrix.target.os}}-${{matrix.builder}}-test-libs | |
path: ${{github.workspace}}/libs | |
cross-build-runs: | |
needs: cross-builds | |
strategy: | |
matrix: | |
builder: | |
- ubuntu-latest | |
target: | |
- os: macos-latest | |
target: mac | |
- os: windows-latest | |
target: windows | |
runs-on: ${{matrix.target.os}} | |
steps: | |
- uses: msys2/setup-msys2@v2 | |
if: ${{ matrix.target.os == 'windows-latest' }} | |
- run: mkdir bins | |
- name: Download CLI | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{matrix.target.os}}-cli | |
path: ${{github.workspace}}/bins | |
- name: Download Tester | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{matrix.target.os}}-tester | |
path: ${{github.workspace}}/bins | |
- name: Set Executable | |
run: chmod +x ./bins/* | |
- name: Download Libs | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{matrix.target.os}}-${{matrix.builder}}-test-libs | |
path: ${{github.workspace}}/libs | |
- name: Run Compiled Artifact | |
run: bins/run_tests${{ matrix.target.os == 'windows-latest' && '.exe' || '' }} existing ${{github.workspace}}/libs | |
env: | |
DEXTEROUS_CLI_PATH: ${{github.workspace}}/bins/dexterous_developer_cli | |
DEXTEROUS_TESTER_PATH: ${{github.workspace}}/testing | |
RUST_LOG: dexterous_developer_internal=trace | |
tests: | |
needs: build-tester | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
test: | |
[ | |
cold, | |
hot, | |
edit, | |
launcher, | |
initialize_resource, | |
update_resource, | |
reset_resource, | |
reset_resource_to_value, | |
resource_schema, | |
insert_components, | |
component_schema, | |
clear_on_reload, | |
setup_on_reload, | |
setup_in_state, | |
replacable_state, | |
update_reloadable_event, | |
remote, | |
asset, | |
] | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-tests-${{ hashFiles('**/Cargo.toml') }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rustfmt, clippy | |
override: true | |
- if: ${{ matrix.os == 'windows-latest' }} | |
name: Add Binutils | |
run: cargo install -f cargo-binutils | |
- if: ${{ matrix.os == 'windows-latest' }} | |
name: Add llvm | |
run: rustup component add llvm-tools-preview | |
- if: ${{ matrix.os == 'macos-latest' }} | |
name: Install LLVM | |
run: brew install llvm | |
- if: ${{ matrix.os == 'ubuntu-latest' }} | |
name: Dependencies | |
run: sudo apt-get update && sudo apt-get install g++ pkg-config libx11-dev libasound2-dev libudev-dev clang lld | |
- run: mkdir bins | |
- name: Download CLI | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{matrix.os}}-cli | |
path: ${{github.workspace}}/bins | |
- name: Download Tester | |
uses: actions/download-artifact@v3 | |
with: | |
name: ${{matrix.os}}-tester | |
path: ${{github.workspace}}/bins | |
- name: Set Executable | |
run: chmod +x ./bins/* | |
- name: Run Test - ${{matrix.test}} | |
run: bins/run_tests${{ matrix.os == 'windows-latest' && '.exe' || '' }} ${{matrix.test}} | |
env: | |
DEXTEROUS_CLI_PATH: ${{github.workspace}}/bins/dexterous_developer_cli | |
DEXTEROUS_TESTER_PATH: ${{github.workspace}}/testing | |
RUST_LOG: dexterous_developer_internal=trace | |
mdbook: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup mdBook | |
uses: peaceiris/actions-mdbook@v1 | |
with: | |
mdbook-version: "latest" | |
- run: mdbook build | |
check-markdown-links: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: check dead links | |
continue-on-error: true | |
id: run1 | |
uses: gaurav-nelson/github-action-markdown-link-check@9710f0fec812ce0a3b98bef4c9d842fc1f39d976 | |
with: | |
use-quiet-mode: "yes" | |
use-verbose-mode: "yes" | |
config-file: ".github/linters/markdown-link-check.json" | |
- name: Sleep for 30 seconds | |
if: steps.run1.outcome=='failure' | |
run: sleep 30s | |
shell: bash | |
- name: check dead links (retry) | |
continue-on-error: true | |
id: run2 | |
if: steps.run1.outcome=='failure' | |
uses: gaurav-nelson/github-action-markdown-link-check@9710f0fec812ce0a3b98bef4c9d842fc1f39d976 | |
with: | |
use-quiet-mode: "yes" | |
use-verbose-mode: "yes" | |
config-file: ".github/linters/markdown-link-check.json" | |
- name: Sleep for 30 seconds | |
if: steps.run2.outcome=='failure' | |
run: sleep 30s | |
shell: bash | |
- name: check dead links (retry 2) | |
continue-on-error: true | |
id: run3 | |
if: steps.run2.outcome=='failure' | |
uses: gaurav-nelson/github-action-markdown-link-check@9710f0fec812ce0a3b98bef4c9d842fc1f39d976 | |
with: | |
use-quiet-mode: "yes" | |
use-verbose-mode: "yes" | |
config-file: ".github/linters/markdown-link-check.json" | |
- name: set the status | |
if: always() | |
run: | | |
if ${{ steps.run1.outcome=='success' || steps.run2.outcome=='success' || steps.run3.outcome=='success' }}; then | |
echo success | |
else | |
exit 1 | |
fi | |
markdownlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
# Full git history is needed to get a proper list of changed files within `super-linter` | |
fetch-depth: 0 | |
- name: Run Markdown Lint | |
uses: docker://ghcr.io/github/super-linter:slim-v4 | |
env: | |
VALIDATE_ALL_CODEBASE: false | |
VALIDATE_MARKDOWN: true | |
DEFAULT_BRANCH: main |