test: treat all platform lint workflows as always-run #288
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
| name: Linux x86 DWARF Smoke | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled, unlabeled] | |
| workflow_dispatch: | |
| inputs: | |
| candidate_sha: | |
| description: Exact 40-character commit SHA to validate | |
| required: true | |
| type: string | |
| # One live run per workflow per ref: a new push to a branch or PR cancels the | |
| # superseded run instead of queuing behind it in the shared account-wide runner | |
| # pool. Runs on main get a unique group, so they are never cancelled or coalesced. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| dwarf-smoke: | |
| if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci-full')) | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 60 | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| PYTHONIOENCODING: utf-8 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.event_name == 'workflow_dispatch' && inputs.candidate_sha || github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| - name: Verify checkout SHA | |
| env: | |
| EXPECTED_SHA: ${{ github.event_name == 'workflow_dispatch' && inputs.candidate_sha || github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }} | |
| run: | | |
| [[ "$EXPECTED_SHA" =~ ^[0-9a-f]{40}$ ]] | |
| if [[ "$GITHUB_EVENT_NAME" == workflow_dispatch ]]; then | |
| test "$EXPECTED_SHA" = "$GITHUB_SHA" | |
| fi | |
| test "$(git rev-parse HEAD)" = "$EXPECTED_SHA" | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - uses: browser-actions/setup-chrome@v2 | |
| id: setup-chrome | |
| with: | |
| chrome-version: stable | |
| install-dependencies: true | |
| - uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| python-version: "3.11.9" | |
| - name: Install Python | |
| run: uv python install "$UV_PYTHON" | |
| # Must run before setup-soldr: its soldr-cook step builds glib-sys / | |
| # gobject-sys, which resolve GTK/WebKit through pkg-config. Cooking first | |
| # fails with exit 101 and every run then compiles those deps cold (#262). | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install -y -qq libgtk-3-dev libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev | |
| - uses: zackees/setup-soldr@v0.9.62 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| with: | |
| # No soldr version pin: keep in lockstep with _build.yml so all jobs | |
| # resolve the same soldr/zccache version and share warm caches | |
| # (see the pin rationale comment in _build.yml and #158). | |
| cache-preset: foundation | |
| cache-key-suffix: ubuntu-24.04-dwarf-smoke | |
| linker: platform-default | |
| toolchain-file: rust-toolchain.toml | |
| - name: Sync Python deps | |
| run: uv sync --group dev | |
| - name: Build fastled CLI | |
| run: soldr cargo build --release --bin fastled | |
| - name: DWARF source smoke | |
| run: | | |
| workdir="$(mktemp -d)" | |
| trap 'rm -rf "$workdir"' EXIT | |
| fastled_bin="$PWD/target/release/fastled" | |
| sketch_dir="$workdir/Blink" | |
| "$fastled_bin" --init Blink --branch master --no-interactive "$workdir" | |
| "$fastled_bin" --internal-dwarf-smoke --debug --no-interactive "$sketch_dir" | |
| - name: Runtime mapped stack smoke | |
| env: | |
| FASTLED_BIN: ${{ github.workspace }}/target/release/fastled | |
| FASTLED_CHROME: ${{ steps.setup-chrome.outputs.chrome-path }} | |
| run: node ci/runtime_stack_smoke.mjs | |
| - name: Dynamic runtime and loader smoke | |
| env: | |
| FASTLED_CHROME: ${{ steps.setup-chrome.outputs.chrome-path }} | |
| run: | | |
| workdir="$(mktemp -d)" | |
| trap 'rm -rf "$workdir"' EXIT | |
| fastled_bin="$PWD/target/release/fastled" | |
| sketch_dir="$workdir/Blink" | |
| "$fastled_bin" --init Blink --branch master --no-interactive "$workdir" | |
| mkdir -p "$sketch_dir/data" | |
| printf '{"dynamic":true}\n' > "$sketch_dir/data/config.json" | |
| "$fastled_bin" --just-compile --quick --link dynamic --no-interactive "$sketch_dir" | |
| node ci/dynamic_runtime_smoke.mjs "$fastled_bin" "$sketch_dir/fastled_js" | |
| mv "$sketch_dir/fastled_js/sketch_assets.json" "$sketch_dir/fastled_js/files.json" | |
| node ci/dynamic_runtime_smoke.mjs "$fastled_bin" "$sketch_dir/fastled_js" | |
| "$fastled_bin" --just-compile --quick --link dynamic --no-app --no-interactive "$sketch_dir" | |
| node ci/dynamic_runtime_smoke.mjs "$fastled_bin" "$sketch_dir/fastled_js" --no-app | |
| - name: Upload failure logs | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: failure-logs-dwarf-smoke-ubuntu-24.04 | |
| path: logs/* | |
| if-no-files-found: warn |