Skip to content

Commit

Permalink
Merge branch 'main' into debug-subscriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
jkelleyrtp authored Feb 29, 2024
2 parents 277e467 + b58a3bb commit d61c3fa
Show file tree
Hide file tree
Showing 45 changed files with 961 additions and 663 deletions.
12 changes: 0 additions & 12 deletions .github/free_space.sh

This file was deleted.

56 changes: 0 additions & 56 deletions .github/workflows/cli_release.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/docs stable.yml

This file was deleted.

38 changes: 0 additions & 38 deletions .github/workflows/docs.yml

This file was deleted.

69 changes: 39 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Whenever an open PR is updated, the workflow will be triggered
#
# This can get expensive, so we do a lot of caching and checks to prevent unnecessary runs

name: Rust CI

on:
push:
branches:
- master
- main
paths:
- packages/**
- examples/**
Expand All @@ -17,7 +21,7 @@ on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- master
- main
paths:
- packages/**
- examples/**
Expand Down Expand Up @@ -48,7 +52,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
save-if: ${{ github.ref == 'refs/heads/master' }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: ilammy/setup-nasm@v1
- run: cargo check --all --examples --tests --all-features --all-targets

Expand All @@ -64,7 +68,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
save-if: ${{ github.ref == 'refs/heads/master' }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: ilammy/setup-nasm@v1
- uses: davidB/rust-cargo-make@v1
- uses: browser-actions/setup-firefox@latest
Expand All @@ -75,7 +79,6 @@ jobs:
large-packages: false
docker-images: false
swap-storage: false

- run: cargo make tests

fmt:
Expand All @@ -91,7 +94,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
save-if: ${{ github.ref == 'refs/heads/master' }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: cargo fmt --all -- --check

clippy:
Expand All @@ -109,9 +112,36 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
save-if: ${{ github.ref == 'refs/heads/master' }}
save-if: ${{ github.ref == 'refs/heads/main' }}
- run: cargo clippy --workspace --examples --tests --all-features --all-targets -- -D warnings

# Only run semver checks if the PR is not a draft and does not have the breaking label
# Breaking PRs don't need to follow semver since they are breaking changes
# However, this means we won't attempt to backport them, so you should be careful about using this label, as it will
# likely make future backporting difficult
#
# todo: fix this so even if breaking changes have been merged, the fix can be backported
#
# This will stop working once the first breaking change has been merged, so we should really try to just backport the fix
# and *then* run the semver checks. Basically "would backporting this PR cause a breaking change on stable?"
#
# semver:
# if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'breaking')
# name: Semver Check
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: dtolnay/rust-toolchain@stable
# - uses: Swatinem/rust-cache@v2
# with:
# cache-all-crates: "true"
# save-if: ${{ github.ref == 'refs/heads/main' }}
# - name: Check semver
# uses: obi1kenobi/cargo-semver-checks-action@v2
# with:
# manifest-path: ./Cargo.toml
# exclude: "dioxus-cli, dioxus-ext"

playwright:
if: github.event.pull_request.draft == false
name: Playwright Tests
Expand All @@ -137,7 +167,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
save-if: ${{ github.ref == 'refs/heads/master' }}
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: Install dependencies
run: npm ci
Expand Down Expand Up @@ -230,29 +260,8 @@ jobs:
with:
key: "${{ matrix.platform.target }}"
cache-all-crates: "true"
save-if: ${{ github.ref == 'refs/heads/master' }}
save-if: ${{ github.ref == 'refs/heads/main' }}

- name: test
run: |
${{ env.RUST_CARGO_COMMAND }} ${{ matrix.platform.command }} ${{ matrix.platform.args }} --target ${{ matrix.platform.target }}
# Coverage is disabled until we can fix it
# coverage:
# name: Coverage
# runs-on: ubuntu-latest
# container:
# image: xd009642/tarpaulin:develop-nightly
# options: --security-opt seccomp=unconfined
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Generate code coverage
# run: |
# apt-get update &&\
# apt-get install build-essential &&\
# apt install libwebkit2gtk-4.0-dev libgtk-3-dev libayatana-appindicator3-dev -y &&\
# cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml
# - name: Upload to codecov.io
# uses: codecov/codecov-action@v2
# with:
# fail_ci_if_error: false
92 changes: 92 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Runs whenever a PR is merged:
# - attempt to backports fixes
# - upload nightly docs
#
# Future:
# - upload nightly CLI builds
# - upload nightly vscode extension
# - upload benchmarks
# - compute coverge
#
# Note that direct commits to master circumvent this workflow!

name: Backport merged pull request
on:
pull_request_target:
types: [closed]

permissions:
contents: write # so it can comment
pull-requests: write # so it can create pull requests

jobs:
# Attempt to backport a merged pull request to the latest stable release
backport:
name: Backport pull request
runs-on: ubuntu-latest

# Don't run on closed unmerged pull requests, or pull requests with the "breaking" label
if: github.event.pull_request.merged && !contains(github.event.pull_request.labels.*.name, 'breaking')
steps:
- uses: actions/checkout@v4
- name: Create backport pull requests
uses: korthout/backport-action@v2

# Upload nightly docs to the website
docs:
runs-on: ubuntu-latest
permissions:
contents: write
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: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly-2024-02-01
- uses: Swatinem/rust-cache@v2
with:
cache-all-crates: "true"
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: ilammy/setup-nasm@v1

- name: cargo doc
run: cargo doc --no-deps --workspace --all-features

- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: target/doc
target-folder: api-docs/nightly
repository-name: dioxuslabs/docsite
clean: false
token: ${{ secrets.DEPLOY_KEY }}

# Attempt to backport a merged pull request to the latest stable release
#
# If the backported PR is succesfully merged
# Any PR without the "breaking" label will be attempted to be backported to the latest stable release

# Coverage is disabled until we can fix it
# coverage:
# name: Coverage
# runs-on: ubuntu-latest
# container:
# image: xd009642/tarpaulin:develop-nightly
# options: --security-opt seccomp=unconfined
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Generate code coverage
# run: |
# apt-get update &&\
# apt-get install build-essential &&\
# apt install libwebkit2gtk-4.0-dev libgtk-3-dev libayatana-appindicator3-dev -y &&\
# cargo +nightly tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml
# - name: Upload to codecov.io
# uses: codecov/codecov-action@v2
# with:
# fail_ci_if_error: false


Loading

0 comments on commit d61c3fa

Please sign in to comment.