Add caching to windows CI and test iOS and android
This commit is contained in:
3 files changed
+73
-135
No files matched your search
@@ -1,42 +0,0 @@
|
|||||||
name: macOS tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
paths:
|
|
||||||
- packages/**
|
|
||||||
- examples/**
|
|
||||||
- src/**
|
|
||||||
- .github/**
|
|
||||||
- lib.rs
|
|
||||||
- Cargo.toml
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened, ready_for_review]
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
paths:
|
|
||||||
- packages/**
|
|
||||||
- examples/**
|
|
||||||
- src/**
|
|
||||||
- .github/**
|
|
||||||
- lib.rs
|
|
||||||
- Cargo.toml
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
if: github.event.pull_request.draft == false
|
|
||||||
name: Test Suite
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
|
||||||
- uses: Swatinem/rust-cache@v2
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- run: |
|
|
||||||
cargo test --all --tests
|
|
||||||
cargo test --package fermi --release
|
|
||||||
@@ -83,6 +83,78 @@ jobs:
|
|||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- run: cargo clippy --workspace --examples --tests -- -D warnings
|
- run: cargo clippy --workspace --examples --tests -- -D warnings
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ${{ matrix.platform.os }}
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
platform:
|
||||||
|
- {
|
||||||
|
target: x86_64-pc-windows-msvc,
|
||||||
|
os: windows-latest,
|
||||||
|
toolchain: '1.65.0',
|
||||||
|
cross: false,
|
||||||
|
command: 'test --all --tests'
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
target: x86_64-unknown-linux-gnu,
|
||||||
|
os: ubuntu-latest,
|
||||||
|
toolchain: '1.65.0',
|
||||||
|
cross: false,
|
||||||
|
command: 'test --all --tests'
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
target: x86_64-apple-darwin,
|
||||||
|
os: macos-latest,
|
||||||
|
toolchain: '1.65.0',
|
||||||
|
cross: false,
|
||||||
|
command: 'test --all --tests'
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
target: aarch64-apple-ios,
|
||||||
|
os: macos-latest,
|
||||||
|
toolchain: '1.65.0',
|
||||||
|
cross: false,
|
||||||
|
command: 'build --package dioxus-mobile'
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
target: aarch64-linux-android,
|
||||||
|
os: ubuntu-latest,
|
||||||
|
toolchain: '1.65.0',
|
||||||
|
cross: true,
|
||||||
|
command: 'build --package dioxus-mobile'
|
||||||
|
}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: install stable
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: ${{ matrix.platform.toolchain }}
|
||||||
|
target: ${{ matrix.platform.target }}
|
||||||
|
override: true
|
||||||
|
default: true
|
||||||
|
|
||||||
|
- name: install Linux dependencies
|
||||||
|
if: contains(matrix.platform.target, 'unknown-linux')
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y webkit2gtk-4.1 libayatana-appindicator3-dev
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: core -> ../target
|
||||||
|
save-if: ${{ matrix.features.key == 'all' }}
|
||||||
|
|
||||||
|
- name: test
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
use-cross: ${{ matrix.platform.cross }}
|
||||||
|
command: ${{ matrix.platform.command }}
|
||||||
|
args: --target ${{ matrix.platform.target }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Coverage is disabled until we can fix it
|
# Coverage is disabled until we can fix it
|
||||||
# coverage:
|
# coverage:
|
||||||
# name: Coverage
|
# name: Coverage
|
||||||
@@ -103,3 +175,4 @@ jobs:
|
|||||||
# uses: codecov/codecov-action@v2
|
# uses: codecov/codecov-action@v2
|
||||||
# with:
|
# with:
|
||||||
# fail_ci_if_error: false
|
# fail_ci_if_error: false
|
||||||
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
name: windows
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
paths:
|
|
||||||
- packages/**
|
|
||||||
- examples/**
|
|
||||||
- src/**
|
|
||||||
- .github/**
|
|
||||||
- lib.rs
|
|
||||||
- Cargo.toml
|
|
||||||
|
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened, ready_for_review]
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
paths:
|
|
||||||
- packages/**
|
|
||||||
- examples/**
|
|
||||||
- src/**
|
|
||||||
- .github/**
|
|
||||||
- lib.rs
|
|
||||||
- Cargo.toml
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
if: github.event.pull_request.draft == false
|
|
||||||
runs-on: windows-latest
|
|
||||||
name: (${{ matrix.target }}, ${{ matrix.cfg_release_channel }})
|
|
||||||
env:
|
|
||||||
CFG_RELEASE_CHANNEL: ${{ matrix.cfg_release_channel }}
|
|
||||||
strategy:
|
|
||||||
# https://help.github.com/en/actions/getting-started-with-github-actions/about-github-actions#usage-limits
|
|
||||||
# There's a limit of 60 concurrent jobs across all repos in the rust-lang organization.
|
|
||||||
# In order to prevent overusing too much of that 60 limit, we throttle the
|
|
||||||
# number of rustfmt jobs that will run concurrently.
|
|
||||||
# max-parallel:
|
|
||||||
# fail-fast: false
|
|
||||||
matrix:
|
|
||||||
target: [x86_64-pc-windows-gnu, x86_64-pc-windows-msvc]
|
|
||||||
cfg_release_channel: [stable]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# The Windows runners have autocrlf enabled by default
|
|
||||||
# which causes failures for some of rustfmt's line-ending sensitive tests
|
|
||||||
- name: disable git eol translation
|
|
||||||
run: git config --global core.autocrlf false
|
|
||||||
|
|
||||||
# Run build
|
|
||||||
- name: Install Rustup using win.rustup.rs
|
|
||||||
run: |
|
|
||||||
# Disable the download progress bar which can cause perf issues
|
|
||||||
$ProgressPreference = "SilentlyContinue"
|
|
||||||
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
|
|
||||||
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=none
|
|
||||||
del rustup-init.exe
|
|
||||||
rustup target add ${{ matrix.target }}
|
|
||||||
shell: powershell
|
|
||||||
|
|
||||||
- name: Add mingw64 to path for x86_64-gnu
|
|
||||||
run: echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
|
|
||||||
if: matrix.target == 'x86_64-pc-windows-gnu' && matrix.channel == 'nightly'
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
# - name: checkout
|
|
||||||
# uses: actions/checkout@v3
|
|
||||||
# with:
|
|
||||||
# path: C:/dioxus.git
|
|
||||||
# fetch-depth: 1
|
|
||||||
|
|
||||||
# we need to use the C drive as the working directory
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
run: |
|
|
||||||
mkdir C:/dioxus.git
|
|
||||||
git clone https://github.com/dioxuslabs/dioxus.git C:/dioxus.git --depth 1
|
|
||||||
|
|
||||||
- name: test
|
|
||||||
working-directory: C:/dioxus.git
|
|
||||||
run: |
|
|
||||||
rustc -Vv
|
|
||||||
cargo -V
|
|
||||||
set RUST_BACKTRACE=1
|
|
||||||
cargo build --all --tests --examples
|
|
||||||
cargo test --all --tests
|
|
||||||
cargo test --package fermi --release
|
|
||||||
shell: cmd
|
|
||||||
Reference in new issue
Block a user