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

test macos and ubuntu #3

Merged
merged 3 commits into from
Jun 11, 2024
Merged
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
55 changes: 47 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,58 @@ on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
branches: [ "*" ]

env:
CARGO_TERM_COLOR: always

jobs:
build:
required:
name: Required
needs:
- ci
runs-on: ubuntu-20.04
steps:
- name: Check results
run: |
[[ ${{ needs.ci.result }} == 'success' ]] || exit 1;

runs-on: ubuntu-latest
ci:
name: CI
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- macos-12
php-version:
- "8.1"
- "8.2"
- "8.3"

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Checkout
uses: actions/checkout@v2

- name: Install libclang for Linux
if: matrix.os == 'ubuntu-20.04'
run: sudo apt-get install -y llvm-10-dev libclang-10-dev

- name: Setup libclang for Macos
if: matrix.os == 'macos-12'
run: |
brew install llvm@13
echo "LIBCLANG_PATH=$(brew --prefix llvm@13)/lib" >> $GITHUB_ENV

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
tools: php-config

- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose
Loading