Skip to content

shared lib and lib version fixes #340

shared lib and lib version fixes

shared lib and lib version fixes #340

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
jobs:
c_build:
name: Check upstream C library
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
optional_args: -pt
- os: windows-latest
optional_args: -pt --cmake_gen ninja
- os: macos-latest
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Fortran compiler
uses: fortran-lang/setup-fortran@8821f57b53846d35d62632eb51c60ac6c4bff4ce # v1.6.1
with:
compiler: intel
- name: Build C library
# 1. Force to only build the 64-bit version since ITT API 32-bit support will be discontinued soon
# 2. Disable PT support for MacOS since we have x86 specific assembly instructions
# 3. Switch to use Ninja CMake Generator for Windows since setup-fortran action
# doesn't work in case of CMake + VS (https://github.com/fortran-lang/setup-fortran/issues/45)
run: python buildall.py --force_bits 64 -ft ${{ matrix.optional_args }}
rust_format:
name: Check Rust formatting
runs-on: ubuntu-latest
defaults:
run:
working-directory: rust
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: rustup component add rustfmt clippy
- run: cargo fmt --all -- --check
- run: cargo clippy
rust_dependencies:
name: Check Rust dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: EmbarkStudios/cargo-deny-action@5def368d93be6684ad20a0fdec5f23c8ea11e022 # v1.5.13
with:
arguments: --manifest-path rust/Cargo.toml
rust_build:
name: Check Rust crate
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: macos-latest
- os: windows-latest
- os: windows-latest
target: x86_64-pc-windows-gnu
defaults:
run:
working-directory: rust
shell: bash
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: recursive
- run: rustup target add ${{ matrix.target }}
if: matrix.target != ''
- run: echo CARGO_BUILD_TARGET=${{ matrix.target }} >> $GITHUB_ENV
if: matrix.target != ''
- name: Build Rust crate
run: cargo build
- name: Test Rust crate
run: cargo test
- name: Check crates are publishable
# The Windows CI transforms the `c-library` symlink into a real directory, modifying the Git
# state, so we ignore these changes with `--allow-dirty` here.
run: scripts/verify-publish.sh --allow-dirty
python_build:
name: Check Python bindings
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
- os: windows-latest
defaults:
run:
working-directory: python
steps:
- name: Checkout sources
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Build and install ittapi package
run: python -m pip install .
- name: Run unit tests
run: python -m unittest discover -s utest -t utest