diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 693bd5ce30..0396c8bd56 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,7 +49,7 @@ jobs: steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@1.84.0 - - uses: Swatinem/rust-cache@v2 + - uses: jkelleyrtp/rust-cache@jk/extra-logging with: cache-all-crates: "true" # https://github.com/foresterre/cargo-msrv/blob/4345edfe3f4fc91cc8ae6c7d6804c0748fae92ae/.github/workflows/msrv.yml @@ -69,18 +69,20 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@v1.3.1 - with: # speed things up a bit - large-packages: false - docker-images: false - swap-storage: false - - run: sudo apt-get update - - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev + # - name: Free Disk Space (Ubuntu) + # uses: jlumbroso/free-disk-space@v1.3.1 + # with: # speed things up a bit + # large-packages: false + # docker-images: false + # swap-storage: false + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev + version: 1.0 - uses: dtolnay/rust-toolchain@1.84.0 with: components: rustfmt, clippy - - uses: Swatinem/rust-cache@v2 + - uses: jkelleyrtp/rust-cache@jk/extra-logging with: cache-all-crates: "true" - uses: browser-actions/setup-firefox@latest @@ -92,18 +94,20 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@v1.3.1 - with: # speed things up a bit - large-packages: false - docker-images: false - swap-storage: false - - run: sudo apt-get update - - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev + # - name: Free Disk Space (Ubuntu) + # uses: jlumbroso/free-disk-space@v1.3.1 + # with: # speed things up a bit + # large-packages: false + # docker-images: false + # swap-storage: false + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev + version: 1.0 - uses: dtolnay/rust-toolchain@1.84.0 with: components: rustfmt, clippy - - uses: Swatinem/rust-cache@v2 + - uses: jkelleyrtp/rust-cache@jk/extra-logging with: cache-all-crates: "true" - uses: browser-actions/setup-firefox@latest @@ -118,7 +122,7 @@ jobs: - uses: dtolnay/rust-toolchain@1.84.0 with: components: rustfmt - - uses: Swatinem/rust-cache@v2 + - uses: jkelleyrtp/rust-cache@jk/extra-logging with: cache-all-crates: "true" - run: cargo fmt --all -- --check @@ -129,13 +133,15 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: sudo apt-get update - - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev + version: 1.0 - name: Install Rust ${{ env.rust_nightly }} uses: dtolnay/rust-toolchain@nightly with: toolchain: ${{ env.rust_nightly }} - - uses: Swatinem/rust-cache@v2 + - uses: jkelleyrtp/rust-cache@jk/extra-logging with: cache-all-crates: "true" - name: "doc --lib --all-features" @@ -154,10 +160,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: sudo apt-get update - - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev + version: 1.0 - uses: dtolnay/rust-toolchain@1.84.0 - - uses: Swatinem/rust-cache@v2 + - uses: jkelleyrtp/rust-cache@jk/extra-logging with: cache-all-crates: "true" - run: cargo check --workspace --all-features --all-targets @@ -168,12 +176,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: sudo apt-get update - - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev + - uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev + version: 1.0 - uses: dtolnay/rust-toolchain@1.84.0 with: components: rustfmt, clippy - - uses: Swatinem/rust-cache@v2 + - uses: jkelleyrtp/rust-cache@jk/extra-logging with: cache-all-crates: "true" - run: cargo clippy --workspace --examples --tests --all-features --all-targets -- -D warnings @@ -202,12 +212,12 @@ jobs: steps: # Do our best to cache the toolchain and node install steps - uses: actions/checkout@v4 - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@v1.3.1 - with: # speed things up a bit - large-packages: false - docker-images: false - swap-storage: false + # - name: Free Disk Space (Ubuntu) + # uses: jlumbroso/free-disk-space@v1.3.1 + # with: # speed things up a bit + # large-packages: false + # docker-images: false + # swap-storage: false - uses: actions/setup-node@v4 with: node-version: 16 @@ -216,7 +226,7 @@ jobs: with: toolchain: stable targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown - - uses: Swatinem/rust-cache@v2 + - uses: jkelleyrtp/rust-cache@jk/extra-logging with: cache-all-crates: "true" - name: Prebuild CLI @@ -301,7 +311,7 @@ jobs: if: ${{ matrix.platform.cross == true }} uses: taiki-e/install-action@cross - - uses: Swatinem/rust-cache@v2 + - uses: jkelleyrtp/rust-cache@jk/extra-logging with: key: "matrix-${{ matrix.platform.target }}" cache-all-crates: "true" @@ -330,7 +340,7 @@ jobs: - uses: dtolnay/rust-toolchain@1.84.0 with: components: rustfmt, clippy - - uses: Swatinem/rust-cache@v2 + - uses: jkelleyrtp/rust-cache@jk/extra-logging with: workspaces: ${{ env.UV_WORKSPACE }} cache-all-crates: "true" @@ -361,7 +371,7 @@ jobs: # steps: # - uses: actions/checkout@v4 # - uses: dtolnay/rust-toolchain@1.84.0 - # - uses: Swatinem/rust-cache@v2 + # - uses: jkelleyrtp/rust-cache@jk/extra-logging # with: # cache-all-crates: "true" # cache-on-failure: "true" diff --git a/packages/playwright-tests/playwright.config.js b/packages/playwright-tests/playwright.config.js index 130e95fdfa..bfe429956e 100644 --- a/packages/playwright-tests/playwright.config.js +++ b/packages/playwright-tests/playwright.config.js @@ -8,6 +8,10 @@ const path = require("path"); */ // require('dotenv').config(); +const runDxCmd = process.env.CI + ? "cargo run --package dioxus-cli --release -- " + : "target/release/dx"; + /** * @see https://playwright.dev/docs/test-configuration */ @@ -20,7 +24,8 @@ module.exports = defineConfig({ /* Retry on CI only */ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ - workers: process.env.CI ? 1 : undefined, + // workers: process.env.CI ? 1 : undefined, + workers: 8, /* Reporter to use. See https://playwright.dev/docs/test-reporters */ reporter: "html", /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ @@ -87,7 +92,8 @@ module.exports = defineConfig({ { cwd: path.join(process.cwd(), "web"), command: - 'cargo run --package dioxus-cli --release -- serve --force-sequential --platform web --addr "127.0.0.1" --port 9999', + runDxCmd + + 'serve --force-sequential --platform web --addr "127.0.0.1" --port 9999', port: 9999, timeout: 50 * 60 * 1000, reuseExistingServer: !process.env.CI, @@ -96,7 +102,8 @@ module.exports = defineConfig({ { cwd: path.join(process.cwd(), "fullstack"), command: - 'cargo run --package dioxus-cli --release -- serve --force-sequential --platform web --addr "127.0.0.1" --port 3333', + runDxCmd + + 'serve --force-sequential --platform web --addr "127.0.0.1" --port 3333', port: 3333, timeout: 50 * 60 * 1000, reuseExistingServer: !process.env.CI, @@ -105,7 +112,8 @@ module.exports = defineConfig({ { cwd: path.join(process.cwd(), "fullstack-mounted"), command: - 'cargo run --package dioxus-cli --release -- serve --force-sequential --platform web --addr "127.0.0.1" --port 7777', + runDxCmd + + 'serve --force-sequential --platform web --addr "127.0.0.1" --port 7777', port: 7777, timeout: 50 * 60 * 1000, reuseExistingServer: !process.env.CI, @@ -114,7 +122,8 @@ module.exports = defineConfig({ { cwd: path.join(process.cwd(), "suspense-carousel"), command: - 'cargo run --package dioxus-cli --release -- serve --force-sequential --platform web --addr "127.0.0.1" --port 4040', + runDxCmd + + 'serve --force-sequential --platform web --addr "127.0.0.1" --port 4040', port: 4040, timeout: 50 * 60 * 1000, reuseExistingServer: !process.env.CI, @@ -123,7 +132,8 @@ module.exports = defineConfig({ { cwd: path.join(process.cwd(), "nested-suspense"), command: - 'cargo run --package dioxus-cli --release -- serve --force-sequential --platform web --addr "127.0.0.1" --port 5050', + runDxCmd + + 'serve --force-sequential --platform web --addr "127.0.0.1" --port 5050', port: 5050, timeout: 50 * 60 * 1000, reuseExistingServer: !process.env.CI, @@ -132,7 +142,8 @@ module.exports = defineConfig({ { cwd: path.join(process.cwd(), "nested-suspense"), command: - 'cargo run --package dioxus-cli --release -- serve --bin nested-suspense-ssg --force-sequential --platform web --ssg --addr "127.0.0.1" --port 6060', + runDxCmd + + 'serve --bin nested-suspense-ssg --force-sequential --platform web --ssg --addr "127.0.0.1" --port 6060', port: 6060, timeout: 50 * 60 * 1000, reuseExistingServer: !process.env.CI, @@ -141,8 +152,7 @@ module.exports = defineConfig({ { cwd: path.join(process.cwd(), "cli-optimization"), // Remove the cache folder for the cli-optimization build to force a full cache reset - command: - 'cargo run --package dioxus-cli --release -- serve --addr "127.0.0.1" --port 8989', + command: runDxCmd + 'serve --addr "127.0.0.1" --port 8989', port: 8989, timeout: 50 * 60 * 1000, reuseExistingServer: !process.env.CI,