Merge pull request #28 from Devolutions/stack/09-pool-extract-wire #89
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: CI | |
| on: | |
| push: | |
| branches: [ "master", "main" ] | |
| pull_request: | |
| branches: [ "master", "main" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| rust-checks: | |
| name: Rust Checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --component clippy,rustfmt | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Cache Cargo registry | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| run: cargo clippy --workspace --all-features --all-targets -- -D warnings | |
| - name: Test | |
| run: cargo test --workspace --exclude ironposh-web | |
| wasm-build-test: | |
| name: WASM Build & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Rust | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| rustup target add wasm32-unknown-unknown | |
| - name: Install wasm-pack | |
| run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
| - name: Cache Cargo registry | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-wasm-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo-wasm- | |
| - name: Build WASM | |
| working-directory: crates/ironposh-web | |
| run: wasm-pack build --target web --scope devolutions | |
| - name: Upload WASM pkg | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ironposh-web-pkg | |
| path: crates/ironposh-web/pkg/ | |
| web-build: | |
| name: Web Projects Build | |
| needs: wasm-build-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download WASM pkg | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: ironposh-web-pkg | |
| path: crates/ironposh-web/pkg | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| cache: 'npm' | |
| cache-dependency-path: '**/package-lock.json' | |
| - name: Build Gateway Token Service | |
| working-directory: web/gateway-token-service | |
| run: | | |
| npm ci | |
| npm run build | |
| - name: Build Terminal Component | |
| working-directory: web/powershell-terminal-component | |
| run: | | |
| npm ci | |
| npm run build:component | |
| # Note: We skip build:wasm here because we downloaded the artifact, | |
| # but we run build:component which uses vite to bundle it. | |
| - name: Build Terminal App | |
| working-directory: web/powershell-terminal-app | |
| run: | | |
| npm ci | |
| npm run build |