dioxus/.github/workflows/windows.yml

89 lines
2.6 KiB
YAML
Raw Normal View History

2022-01-03 22:35:04 +00:00
name: windows
2022-02-10 17:09:50 +00:00
2022-01-03 22:35:04 +00:00
on:
2022-02-23 16:26:31 +00:00
push:
branches:
- master
paths:
- packages/**
- examples/**
- src/**
- .github/**
- lib.rs
- Cargo.toml
2022-02-17 16:19:28 +00:00
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- master
2022-02-10 17:09:50 +00:00
paths:
- packages/**
- examples/**
- src/**
- .github/**
- lib.rs
- Cargo.toml
2022-01-03 22:35:04 +00:00
jobs:
test:
2022-02-13 17:41:38 +00:00
if: github.event.pull_request.draft == false
2022-01-03 22:35:04 +00:00
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.
2023-01-03 05:40:15 +00:00
# max-parallel:
# fail-fast: false
2022-01-03 22:35:04 +00:00
matrix:
target: [x86_64-pc-windows-gnu, x86_64-pc-windows-msvc]
2022-01-07 06:06:55 +00:00
cfg_release_channel: [stable]
2022-01-03 22:35:04 +00:00
steps:
2022-01-05 22:30:12 +00:00
# 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
2022-01-03 22:35:04 +00:00
2022-01-05 22:30:12 +00:00
# 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
2022-01-03 22:35:04 +00:00
2022-01-05 22:30:12 +00:00
- 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
2022-01-03 22:35:04 +00:00
2023-01-03 05:45:17 +00:00
# - name: checkout
# uses: actions/checkout@v3
# with:
# path: C:/dioxus.git
# fetch-depth: 1
2023-01-03 05:40:15 +00:00
# we need to use the C drive as the working directory
2023-01-03 05:45:17 +00:00
- name: Checkout
run: |
mkdir C:/dioxus.git
git clone https://github.com/dioxuslabs/dioxus.git C:/dioxus.git --depth 1
2022-12-13 23:34:35 +00:00
2022-01-05 22:37:41 +00:00
- name: test
2023-01-03 05:40:15 +00:00
working-directory: C:/dioxus.git
2022-01-05 22:30:12 +00:00
run: |
rustc -Vv
cargo -V
2022-02-10 17:09:50 +00:00
set RUST_BACKTRACE=1
cargo build --all --tests --examples
cargo test --all --tests
2022-01-05 22:30:12 +00:00
shell: cmd