Skip to content

Commit b891d07

Browse files
committed
Add Linux CI
1 parent a63bf5a commit b891d07

File tree

1 file changed

+45
-31
lines changed

1 file changed

+45
-31
lines changed

.github/workflows/CI.yml

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,6 @@ name: CI
33
on: [push, pull_request]
44

55
jobs:
6-
# linux:
7-
# runs-on: ubuntu-latest
8-
# strategy:
9-
# matrix:
10-
# target: [x86_64, aarch64]
11-
# steps:
12-
# - uses: actions/checkout@v3
13-
# with:
14-
# submodules: 'true'
15-
16-
# - uses: actions/setup-python@v4
17-
# with:
18-
# python-version: '3.10'
19-
20-
# - name: Install Rust toolchain
21-
# uses: dtolnay/rust-toolchain@stable
22-
# with:
23-
# targets: aarch64-linux-gnu, x86-64-linux-gnu
24-
25-
# - name: Install Rust aarch64-apple-darwin target
26-
# if: matrix.platform.os == 'macos-latest'
27-
# run: rustup target add aarch64-apple-darwin
28-
29-
# - name: Upload wheels
30-
# uses: actions/upload-artifact@v3
31-
# with:
32-
# name: wheels
33-
# path: dist
34-
356
windows:
367
# Skip building pull requests from the same repository
378
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:
12394
name: wheels
12495
path: dist
12596

97+
linux:
98+
# Skip building pull requests from the same repository
99+
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
100+
runs-on: macos-latest
101+
env:
102+
# Disable output buffering in an attempt to get readable errors
103+
PYTHONUNBUFFERED: '1'
104+
steps:
105+
- name: Checkout
106+
uses: actions/checkout@v3
107+
with:
108+
submodules: 'true'
109+
110+
- name: Python environment
111+
uses: actions/setup-python@v4
112+
with:
113+
python-version: '3.10'
114+
115+
- name: Install Rust toolchain
116+
uses: dtolnay/rust-toolchain@stable
117+
with:
118+
targets: x86_64-unknown-linux-gnu
119+
120+
- name: Build
121+
shell: bash
122+
run: |
123+
pip install -r requirements.txt
124+
python setup.py bdist_wheel --py-limited-api=cp37
125+
pip install --force-reinstall dist/*.whl
126+
python -c "import icicle"
127+
128+
- name: Test
129+
run: |
130+
pip install -r tests/requirements.txt
131+
python tests/example.py
132+
python tests/invalid.py
133+
134+
- name: Upload wheels
135+
uses: actions/upload-artifact@v3
136+
with:
137+
name: wheels
138+
path: dist
139+
126140
release:
127141
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
128142
runs-on: ubuntu-latest
129143
needs:
130144
- windows
131145
- macos
132-
#- linux
146+
- linux
133147
steps:
134148
- uses: actions/download-artifact@v3
135149
with:
@@ -140,7 +154,7 @@ jobs:
140154
with:
141155
python-version: '3.10'
142156

143-
- name: Package
157+
- name: Source distribution
144158
run: |
145159
python setup.py sdist
146160

0 commit comments

Comments
 (0)