Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: speedy-cache-2 #3670

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 49 additions & 39 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
- 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
Expand All @@ -69,18 +69,20 @@
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
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/[email protected]
# 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/[email protected]
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
Expand All @@ -92,18 +94,20 @@
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
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/[email protected]
# 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/[email protected]
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
Expand All @@ -118,7 +122,7 @@
- uses: dtolnay/[email protected]
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
Expand All @@ -129,13 +133,15 @@
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"
Expand All @@ -154,10 +160,12 @@
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/[email protected]
- 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
Expand All @@ -168,12 +176,14 @@
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/[email protected]
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
Expand All @@ -187,7 +197,7 @@
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main

Check warning on line 200 in .github/workflows/main.yml

View workflow job for this annotation

GitHub Actions / nix (ubuntu-latest)

Magic Nix Cache is deprecated

Magic Nix Cache has been deprecated due to a change in the underlying GitHub APIs and will stop working on 1 February 2025. To continue caching Nix builds in GitHub Actions, use FlakeHub Cache instead. Replace... - uses: DeterminateSystems/magic-nix-cache-action@main ...with... - uses: DeterminateSystems/flakehub-cache-action@main For more details: https://dtr.mn/magic-nix-cache-eol

Check warning on line 200 in .github/workflows/main.yml

View workflow job for this annotation

GitHub Actions / nix (macos-latest)

Magic Nix Cache is deprecated

Magic Nix Cache has been deprecated due to a change in the underlying GitHub APIs and will stop working on 1 February 2025. To continue caching Nix builds in GitHub Actions, use FlakeHub Cache instead. Replace... - uses: DeterminateSystems/magic-nix-cache-action@main ...with... - uses: DeterminateSystems/flakehub-cache-action@main For more details: https://dtr.mn/magic-nix-cache-eol
- name: Install omnix
run: nix --accept-flake-config profile install "github:juspay/omnix"
- name: Build all flake outputs
Expand All @@ -202,12 +212,12 @@
steps:
# Do our best to cache the toolchain and node install steps
- uses: actions/checkout@v4
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
with: # speed things up a bit
large-packages: false
docker-images: false
swap-storage: false
# - name: Free Disk Space (Ubuntu)
# uses: jlumbroso/[email protected]
# with: # speed things up a bit
# large-packages: false
# docker-images: false
# swap-storage: false
- uses: actions/setup-node@v4
with:
node-version: 16
Expand All @@ -216,7 +226,7 @@
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
Expand Down Expand Up @@ -301,7 +311,7 @@
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"
Expand Down Expand Up @@ -330,7 +340,7 @@
- uses: dtolnay/[email protected]
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"
Expand Down Expand Up @@ -361,7 +371,7 @@
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/[email protected]
# - uses: Swatinem/rust-cache@v2
# - uses: jkelleyrtp/rust-cache@jk/extra-logging
# with:
# cache-all-crates: "true"
# cache-on-failure: "true"
Expand Down
28 changes: 19 additions & 9 deletions packages/playwright-tests/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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. */
Expand Down Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down