Add Linux CI

This commit is contained in:
Duncan Ogilvie
2023-08-13 01:15:29 +02:00
parent a63bf5acf6
commit b891d07dba
+45 -31
View File
@@ -3,35 +3,6 @@ name: CI
on: [push, pull_request]
jobs:
# linux:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# target: [x86_64, aarch64]
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: 'true'
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - name: Install Rust toolchain
# uses: dtolnay/rust-toolchain@stable
# with:
# targets: aarch64-linux-gnu, x86-64-linux-gnu
# - name: Install Rust aarch64-apple-darwin target
# if: matrix.platform.os == 'macos-latest'
# run: rustup target add aarch64-apple-darwin
# - name: Upload wheels
# uses: actions/upload-artifact@v3
# with:
# name: wheels
# path: dist
windows:
# Skip building pull requests from the same repository
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
@@ -123,13 +94,56 @@ jobs:
name: wheels
path: dist
linux:
# Skip building pull requests from the same repository
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
runs-on: macos-latest
env:
# Disable output buffering in an attempt to get readable errors
PYTHONUNBUFFERED: '1'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Python environment
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-linux-gnu
- name: Build
shell: bash
run: |
pip install -r requirements.txt
python setup.py bdist_wheel --py-limited-api=cp37
pip install --force-reinstall dist/*.whl
python -c "import icicle"
- name: Test
run: |
pip install -r tests/requirements.txt
python tests/example.py
python tests/invalid.py
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
release:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
needs:
- windows
- macos
#- linux
- linux
steps:
- uses: actions/download-artifact@v3
with:
@@ -140,7 +154,7 @@ jobs:
with:
python-version: '3.10'
- name: Package
- name: Source distribution
run: |
python setup.py sdist