| 1 |
name: Build & Test |
| 2 |
|
| 3 |
on: [push, pull_request] |
| 4 |
|
| 5 |
permissions: |
| 6 |
contents: read |
| 7 |
|
| 8 |
jobs: |
| 9 |
GCC-CLANG: |
| 10 |
name: "${{ matrix.os }}-${{ matrix.altname || matrix.cc }}" |
| 11 |
runs-on: ${{ matrix.os }} |
| 12 |
timeout-minutes: 10 |
| 13 |
strategy: |
| 14 |
fail-fast: false |
| 15 |
max-parallel: 8 |
| 16 |
matrix: |
| 17 |
include: |
| 18 |
- {os: ubuntu-22.04, cc: gcc, cxx: g++} |
| 19 |
- {os: ubuntu-22.04, cc: clang, cxx: clang++} |
| 20 |
- {os: ubuntu-20.04, cc: gcc, cxx: g++} |
| 21 |
- {os: ubuntu-20.04, cc: clang, cxx: clang++} |
| 22 |
- {os: macos-latest, cc: clang, cxx: clang++} |
| 23 |
- {os: windows-latest, cc: gcc, cxx: g++, altname: "mingw-gcc"} |
| 24 |
env: |
| 25 |
MRUBY_CONFIG: ci/gcc-clang |
| 26 |
CC: ${{ matrix.cc }} |
| 27 |
CXX: ${{ matrix.cxx }} |
| 28 |
LD: ${{ matrix.cc }} |
| 29 |
steps: |
| 30 |
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" |
| 31 |
uses: actions/checkout@v4 |
| 32 |
- name: Ruby version |
| 33 |
run: ruby -v |
| 34 |
- name: Compiler version |
| 35 |
run: ${{ env.CC }} --version |
| 36 |
- name: Build and test |
| 37 |
run: rake -m test:build && rake test:run |
| 38 |
|
| 39 |
Windows-VC: |
| 40 |
runs-on: windows-2022 |
| 41 |
timeout-minutes: 10 |
| 42 |
env: |
| 43 |
MRUBY_CONFIG: ci/msvc |
| 44 |
steps: |
| 45 |
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" |
| 46 |
uses: actions/checkout@v4 |
| 47 |
- name: Ruby version |
| 48 |
run: ruby -v |
| 49 |
- name: Build and test |
| 50 |
shell: cmd |
| 51 |
run: | |
| 52 |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" |
| 53 |
rake -m test:build && rake test:run |