Skip to content

Update README (#230) #751

Update README (#230)

Update README (#230) #751

Workflow file for this run

# 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-18
jobs:
required:
name: Required
needs:
- ci
runs-on: ubuntu-24.04
steps:
- name: Check results
run: |
[[ ${{ needs.ci.result }} == 'success' ]] || exit 1;
ci:
name: CI
strategy:
fail-fast: false
matrix:
include:
# Ubuntu - all PHP versions
- { os: ubuntu-24.04, php-version: "7.0", ts: false }
- { os: ubuntu-24.04, php-version: "7.1", ts: false }
- { os: ubuntu-24.04, php-version: "7.2", ts: false }
- { os: ubuntu-24.04, php-version: "7.3", ts: false }
- { os: ubuntu-24.04, php-version: "7.4", ts: false }
- { os: ubuntu-24.04, php-version: "8.0", ts: false }
- { os: ubuntu-24.04, php-version: "8.1", ts: false }
- { os: ubuntu-24.04, php-version: "8.2", ts: false }
- { os: ubuntu-24.04, php-version: "8.3", ts: false }
- { os: ubuntu-24.04, php-version: "8.4", ts: false }
- { os: ubuntu-24.04, php-version: "8.5", ts: false }
# Ubuntu - ZTS smoke matrix
- { os: ubuntu-24.04, php-version: "8.1", ts: true }
- { os: ubuntu-24.04, php-version: "8.2", ts: true }
# macOS - PHP 8.1+
- { os: macos-14, php-version: "8.1", ts: false }
- { os: macos-14, php-version: "8.2", ts: false }
- { os: macos-14, php-version: "8.3", ts: false }
- { os: macos-14, php-version: "8.4", ts: false }
- { os: macos-14, php-version: "8.5", ts: false }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install libclang for Linux
if: matrix.os == 'ubuntu-24.04'
run: sudo apt-get update && sudo apt-get install -y llvm-18-dev libclang-18-dev
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: php-config
env:
phpts: ${{ matrix.ts == true && 'ts' || 'nts' }}
- name: PHP version
run: |
echo "=== php path ===" && which php
echo "=== php --version ===" && php --version
echo "=== php-config path ===" && which php-config
echo "=== php-config --version ===" && php-config --version
echo "=== php-fpm path ===" && which php-fpm
echo "=== php-fpm --version ===" && php-fpm --version
[[ `php --version` == PHP\ ${{ matrix.php-version }}.* ]] || exit 1;
[[ `php-config --version` == ${{ matrix.php-version }}.* ]] || exit 1;
[[ `php-fpm --version` == PHP\ ${{ matrix.php-version }}.* ]] || exit 1;
- name: Install Rust Nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt
- name: Setup cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.os }}-ci-${{ matrix.php-version }}-ts-${{ matrix.ts }}-${{ hashFiles('**/Cargo.lock') }}
- name: Cargo fmt
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: fmt
args: --all -- --check
- name: Cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --release
- name: Cargo build
uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --release -- --nocapture
- name: Cargo doc
uses: actions-rs/cargo@v1
env:
RUSTDOCFLAGS: "-D warnings --cfg docsrs"
with:
toolchain: nightly
command: doc
args: --workspace --no-deps --all-features