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

ci: Migrate test workflows #214

Merged
merged 4 commits into from
Feb 19, 2024
Merged
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
80 changes: 80 additions & 0 deletions .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Test

on:
push:
branches:
- master
pull_request:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true

env:
RUST_BACKTRACE: 1

jobs:
test:
runs-on: ${{ matrix.setup.os }}
strategy:
matrix:
toolchain: ["nightly", "beta"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since beta is the next stable predictably, perhaps we can verify beta directly and announce compio as always compatible with stable?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At that time AFIT is not stablized. Now compio should be compatible with stable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it. File #297

setup:
- os: "ubuntu-20.04"
- os: "ubuntu-22.04"
features: "io-uring-sqe128,io-uring-cqe32"
- os: "ubuntu-20.04"
features: "polling"
no_default_features: true
- os: "ubuntu-22.04"
features: "polling"
no_default_features: true
- os: "ubuntu-20.04"
features: "polling,native-tls"
no_default_features: true
- os: "ubuntu-22.04"
features: "polling,native-tls"
no_default_features: true
- os: "windows-latest"
target: "x86_64-pc-windows-msvc"
- os: "windows-latest"
target: "x86_64-pc-windows-gnu"
- os: "windows-latest"
target: "i686-pc-windows-msvc"
- os: "macos-12"
- os: "macos-13"
- os: "macos-14"
steps:
- uses: actions/checkout@v4
- name: Setup Rust Toolchain
run: rustup toolchain install ${{ matrix.toolchain }}
- name: Setup target
if: ${{ matrix.setup.target }}
run: rustup +${{ matrix.toolchain }} target install ${{ matrix.setup.target }}
- name: Test on ${{ matrix.setup.os }} ${{ matrix.toolchain }} ${{ matrix.setup.target }}
shell: bash
run: |
set -ex

ARGS=("--features" "all")

# Add feature "nightly" if toolchain is nightly
if [[ "${{ matrix.toolchain }}" == "nightly" ]]; then
ARGS+=("--features" "nightly")
fi
# Add features if features is not empty
if [[ -n "${{ matrix.setup.features }}" ]]; then
ARGS+=("--features" "${{ matrix.setup.features }}")
fi
# Add no-default-features if no_default_features is true
if [[ -n "${{ matrix.setup.no_default_features }}" ]]; then
ARGS+=("--no-default-features")
fi
# Add doctest-xcompile if on windows and nightly
if [[ "${{ matrix.setup.os }}" == "windows-latest" && ${{ matrix.toolchain }} == "nightly" ]]; then
ARGS+=("-Z" "doctest-xcompile")
fi

cargo +${{ matrix.toolchain }} test --workspace "${ARGS[@]}"
92 changes: 0 additions & 92 deletions azure-pipelines.yml

This file was deleted.