feat: C modules into separate translation units #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2022 PHPER Framework Team | |
# PHPER is licensed under Mulan PSL v2. | |
# You can use this software according to the terms and conditions of the Mulan | |
# PSL v2. You may obtain a copy of Mulan PSL v2 at: | |
# http://license.coscl.org.cn/MulanPSL2 | |
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY | |
# KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO | |
# NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. | |
# See the Mulan PSL v2 for more details. | |
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: ["**"] | |
env: | |
RUST_LOG: debug | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: "1" | |
RUSTFLAGS: "-D warnings" | |
LLVM_CONFIG_PATH: llvm-config-15 | |
jobs: | |
ci: | |
name: CI | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
php-version: | |
- "8.1" | |
- "8.2" | |
- "8.3" | |
runs-on: ${{ matrix.os }} | |
container: rust:1.75-slim-bookworm | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup system | |
run: | | |
apt-get update | |
apt-get install -y llvm-15-dev libclang-15-dev clang-15 build-essential | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
tools: php-config,composer | |
# - name: Setup php-fpm | |
# run: | | |
# apt-get install -y php${{ matrix.php-version }}-fpm | |
# rm -f /usr/sbin/php-fpm | |
# ln -s /usr/sbin/php-fpm${{ matrix.php-version }} /usr/sbin/php-fpm | |
- name: Setup cargo cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ci-${{ matrix.php-version }}-${{ hashFiles('**/Cargo.lock') }} | |
- name: Cargo format | |
run: | | |
cargo fmt --all -- --check | |
- name: Cargo clippy | |
run: | | |
cargo clippy --release | |
- name: Cargo build | |
run: | | |
cargo build --release | |
- name: Cargo test | |
run: | | |
cargo test --release -- --nocapture | |
# - name: Cargo doc | |
# env: | |
# RUSTDOCFLAGS: "-D warnings --cfg docsrs" | |
# run: | | |
# cargo doc --workspace --no-deps --all-features |