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: fuse the build & test to one #519

Open
wants to merge 6 commits into
base: develop/main
Choose a base branch
from
Open
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
118 changes: 28 additions & 90 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,17 @@ on:
branches: [ develop/main, develop/3.10 ]

jobs:
bench-linux:
runs-on: ubuntu-latest
benchmark:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-20.04", "MacOS-11", "Windows-latest"]
python-version: ["3.10"]
dot-net-version: [ "7.0.100" ]

defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -24,109 +28,43 @@ jobs:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install CLR requirements
if: runner.os == 'Linux'
run: |
sudo apt-get -y update
sudo apt-get install -y cmake llvm-9 clang-9 autoconf automake \
libtool build-essential python curl git lldb-6.0 liblldb-6.0-dev \
libunwind8 libunwind8-dev gettext libicu-dev liblttng-ust-dev \
libssl-dev libnuma-dev libkrb5-dev zlib1g-dev
libtool build-essential python curl git lldb-6.0 liblldb-6.0-dev \
libunwind8 libunwind8-dev gettext libicu-dev liblttng-ust-dev \
libssl-dev libnuma-dev libkrb5-dev zlib1g-dev
- uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dot-net-version }}

- name: Build Python Package
shell: bash
run: python -m pip install --upgrade pip && pip install .

- name: Run benchmark tests
shell: bash
- name: Build & install Python Package [Unix]
if: runner.os != 'Windows'
run: |
python -m pip install -r Tests/requirements_test.txt
python Tests/benchmarks/suite.py

bench-macos-11:
runs-on: macos-11
strategy:
matrix:
python-version: ["3.10"]
dot-net-version: [ "7.0.100" ]

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dot-net-version }}

- name: Build Python Package
shell: bash
run: python -m pip install --upgrade pip && pip install .

- name: Run benchmark tests
shell: bash
run: |
python -m pip install -r Tests/requirements_test.txt
python Tests/benchmarks/suite.py

bench-windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.10"]
dot-net-version: [ "7.0.100" ]

steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: x64

- uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dot-net-version }}
python -m pip install --upgrade pip
pip install .

- name: Add msbuild to PATH
if: runner.os == 'Windows'
uses: microsoft/[email protected]

- name: Create Build Environment
if: runner.os == 'Windows'
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure CMake
shell: bash
- name: Configure & Build CMake
if: runner.os == 'Windows'
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release

- name: Build
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config Release

- name: Install build deps
shell: bash
run: python -m pip install -U scikit-build

- name: Build Python Package
shell: bash
run: python setup.py build

- name: Install Python Package
shell: bash
run: python setup.py install
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
- name: Build & install Python Package [Windows]
if: runner.os == 'Windows'
run: |
python -m pip install -U scikit-build
python setup.py build
python setup.py install

- name: Run benchmark tests
shell: bash
run: |
python -m pip install -r Tests/requirements_test.txt
python Tests/benchmarks/suite.py
16 changes: 8 additions & 8 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ on:
env:
BUILD_TYPE: Debug

defaults:
run:
shell: bash

jobs:
analyze:
name: Analyze c++
Expand Down Expand Up @@ -71,15 +75,11 @@ jobs:
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE

- name: Build
- name: Configure & Build CMake
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE
run: |
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
cmake --build . --config $BUILD_TYPE

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand Down
Loading
Loading