Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Aug 12, 2023
1 parent bf3571f commit 855e7a2
Showing 1 changed file with 81 additions and 83 deletions.
164 changes: 81 additions & 83 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,30 @@ concurrency:
cancel-in-progress: true

jobs:
deny:
uses: taiki-e/workflows/.github/workflows/deny.yml@main
msrv:
uses: taiki-e/workflows/.github/workflows/msrv.yml@main
with:
event_name: ${{ github.event_name }}
tidy:
uses: taiki-e/workflows/.github/workflows/tidy.yml@main
# deny:
# uses: taiki-e/workflows/.github/workflows/deny.yml@main
# msrv:
# uses: taiki-e/workflows/.github/workflows/msrv.yml@main
# with:
# event_name: ${{ github.event_name }}
# tidy:
# uses: taiki-e/workflows/.github/workflows/tidy.yml@main

test:
strategy:
fail-fast: false
matrix:
include:
# TODO: nightly-2023-04-27 (https://github.com/rust-lang/rust/pull/97368)
# and nightly-2023-05-03 (https://github.com/rust-lang/rust/pull/111042)
# fixed bugs in report generation, so the latest report is not the
# same as the old report.
# - rust: '1.60'
- rust: stable
- rust: beta
- rust: nightly
- rust: nightly
os: macos-11
# # TODO: nightly-2023-04-27 (https://github.com/rust-lang/rust/pull/97368)
# # and nightly-2023-05-03 (https://github.com/rust-lang/rust/pull/111042)
# # fixed bugs in report generation, so the latest report is not the
# # same as the old report.
# # - rust: '1.60'
# - rust: stable
# - rust: beta
# - rust: nightly
# - rust: nightly
# os: macos-11
- rust: nightly
os: windows-2019
runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
Expand All @@ -71,16 +71,18 @@ jobs:
- uses: taiki-e/install-action@nextest
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >>"${GITHUB_ENV}"
if: startsWith(matrix.os, 'windows')
- run: cargo test --workspace --all-features
# - run: cargo test --workspace --all-features
# TODO: move this test to tests/test.rs
- run: cargo install --path . --debug
- run: |
set -euxo pipefail
cargo llvm-cov nextest --text --fail-under-lines 50
cargo llvm-cov nextest --text --fail-under-lines 50 --profile default --cargo-profile dev
cargo llvm-cov nextest --text --fail-under-lines 50 --profile ci
cargo llvm-cov nextest --text --fail-under-lines 50 --profile ci --cargo-profile dev
working-directory: tests/fixtures/crates/bin_crate
# - run: |
# set -euxo pipefail
# cargo llvm-cov nextest --text --fail-under-lines 50
# cargo llvm-cov nextest --text --fail-under-lines 50 --profile default --cargo-profile dev
# cargo llvm-cov nextest --text --fail-under-lines 50 --profile ci
# cargo llvm-cov nextest --text --fail-under-lines 50 --profile ci --cargo-profile dev
# working-directory: tests/fixtures/crates/bin_crate
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=-crt-static" >>"${GITHUB_ENV}"
if: startsWith(matrix.os, 'windows')
- run: |
set -euxo pipefail
git clone https://github.com/taiki-e/easytime.git
Expand All @@ -93,63 +95,59 @@ jobs:
# Test trybuild compatibility.
git clone https://github.com/taiki-e/easy-ext.git
cd easy-ext
case "${OSTYPE}" in
# TODO
cygwin* | msys*) cargo llvm-cov --text --test compiletest ;;
*) cargo llvm-cov --text --test compiletest --fail-under-lines 70 ;;
esac
cargo llvm-cov --text --test compiletest --fail-under-lines 70
if: startsWith(matrix.rust, 'nightly')
- run: cargo minimal-versions build --workspace --all-features --ignore-private
# - run: cargo minimal-versions build --workspace --all-features --ignore-private

build:
name: build (${{ matrix.target }})
strategy:
fail-fast: false
matrix:
# When updating this list, the reminder to update the target list in release.yml.
include:
- target: aarch64-unknown-linux-gnu
- target: aarch64-unknown-linux-musl
- target: aarch64-apple-darwin
os: macos-11
- target: x86_64-unknown-linux-gnu
- target: x86_64-unknown-linux-musl
- target: x86_64-apple-darwin
os: macos-11
- target: x86_64-pc-windows-msvc
os: windows-2019
runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install Rust
run: rustup update stable --no-self-update
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >>"${GITHUB_ENV}"
if: endsWith(matrix.target, 'windows-msvc')
- run: cargo build --target ${{ matrix.target }}
- run: cargo build --target ${{ matrix.target }} --release
# For debugging
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target }}
path: target/${{ matrix.target }}/release/cargo-llvm-cov*
# build:
# name: build (${{ matrix.target }})
# strategy:
# fail-fast: false
# matrix:
# # When updating this list, the reminder to update the target list in release.yml.
# include:
# - target: aarch64-unknown-linux-gnu
# - target: aarch64-unknown-linux-musl
# - target: aarch64-apple-darwin
# os: macos-11
# - target: x86_64-unknown-linux-gnu
# - target: x86_64-unknown-linux-musl
# - target: x86_64-apple-darwin
# os: macos-11
# - target: x86_64-pc-windows-msvc
# os: windows-2019
# runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
# timeout-minutes: 60
# steps:
# - uses: actions/checkout@v3
# with:
# persist-credentials: false
# - name: Install Rust
# run: rustup update stable --no-self-update
# - uses: taiki-e/setup-cross-toolchain-action@v1
# with:
# target: ${{ matrix.target }}
# - run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >>"${GITHUB_ENV}"
# if: endsWith(matrix.target, 'windows-msvc')
# - run: cargo build --target ${{ matrix.target }}
# - run: cargo build --target ${{ matrix.target }} --release
# # For debugging
# - uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.target }}
# path: target/${{ matrix.target }}/release/cargo-llvm-cov*

miri:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install Rust
run: rustup toolchain add nightly --no-self-update --component miri && rustup default nightly
- run: cargo miri test --workspace --all-features
env:
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-retag-fields -Zmiri-disable-isolation
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -Z randomize-layout
RUSTFLAGS: ${{ env.RUSTFLAGS }} -Z randomize-layout
# miri:
# runs-on: ubuntu-latest
# timeout-minutes: 60
# steps:
# - uses: actions/checkout@v3
# with:
# persist-credentials: false
# - name: Install Rust
# run: rustup toolchain add nightly --no-self-update --component miri && rustup default nightly
# - run: cargo miri test --workspace --all-features
# env:
# MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-retag-fields -Zmiri-disable-isolation
# RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -Z randomize-layout
# RUSTFLAGS: ${{ env.RUSTFLAGS }} -Z randomize-layout

0 comments on commit 855e7a2

Please sign in to comment.