Merge pull request #60 from matsui528/build #54
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
name: Build | |
on: [push] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# https://github.blog/2019-08-08-github-actions-now-supports-ci-cd/ | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ['3.8', '3.9', '3.10'] | |
# https://stackoverflow.com/questions/57810623/how-to-select-the-c-c-compiler-used-for-a-github-actions-job: | |
compiler: [gcc, clang, cl] | |
exclude: | |
# ubuntu: gcc | |
- os: ubuntu-latest | |
compiler: clang | |
- os: ubuntu-latest | |
compiler: cl | |
# mac: gcc, clang | |
- os: macos-latest | |
compiler: cl | |
# win: cl | |
- os: windows-latest | |
compiler: clang | |
- os: windows-latest | |
compiler: gcc | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Print machine info | |
run: | | |
uname -a | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Install Rii | |
run: | | |
make build | |
- name: Test with CC=${{ matrix.compiler }} | |
env: | |
CC: ${{ matrix.compiler }} | |
run: | | |
make test | |