Skip to content

Commit

Permalink
modify CI.yml to examples from isolated build experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
gschoeni committed Jun 9, 2023
1 parent d0e9ce0 commit 7995dc8
Showing 1 changed file with 140 additions and 85 deletions.
225 changes: 140 additions & 85 deletions .github/workflows/CI.yml
Expand Up @@ -19,61 +19,113 @@ permissions:
contents: read

jobs:
# linux:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# target: [x86_64]
# # target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.target }}
# args: --release --out dist --find-interpreter
# sccache: 'true'
# manylinux: auto
# working-directory: oxen
# - name: Upload wheels
# uses: actions/upload-artifact@v3
# with:
# name: wheels
# path: dist
linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64]
# target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: auto
working-directory: oxen
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

# windows:
# runs-on: windows-latest
# strategy:
# matrix:
# target: [x64, x86]
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# architecture: ${{ matrix.target }}
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.target }}
# args: --release --out dist --find-interpreter
# sccache: 'true'
# working-directory: oxen
# - name: Upload wheels
# uses: actions/upload-artifact@v3
# with:
# name: wheels
# path: dist
windows:
runs-on: windows-latest
strategy:
matrix:
python: [
{
name: "cp310-cp310",
version: "3.10"
},
]
rust: [stable]
platform: [
{
os: "windows-latest",
python-architecture: "x86",
rust-target: "i686-pc-windows-msvc",
name: "Windows x86"
},
{
os: "windows-latest",
python-architecture: "x64",
rust-target: "x86_64-pc-windows-msvc",
name: "Windows x64"
},
]
steps:
- uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python.version }}
architecture: ${{ matrix.platform.python-architecture }}
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.platform.rust-target }}
default: true
profile: minimal
override: true
- name: Install CLang
uses: KyleMayes/install-llvm-action@v1
with:
version: "15.0"
directory: ${{ runner.temp }}/llvm
- name: Set LIBCLANG_PATH
run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> ${GITHUB_ENV}
- name: Build package Windows
env:
PY_LOCATION: ${{ env.pythonLocation }}
run: maturin build --release --out dist --interpreter ${env:PY_LOCATION}\python.exe
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

macos:
runs-on: macos-12
runs-on: macos-13
strategy:
matrix:
# target: [x86_64, aarch64]
target: [x86_64]
python: [
{
name: "cp310-cp310",
version: "3.10"
},
]
rust: [stable]
platform: [
{
os: "macos-13",
python-architecture: "x64",
rust-target: "aarch64-apple-darwin",
name: "macOS arm64"
},
{
os: "macos-13",
python-architecture: "x64",
rust-target: "x86_64-apple-darwin",
name: "macOS x64"
},
]
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
Expand All @@ -83,57 +135,60 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.toml') }}
key: ${{ runner.os }}-${{ matrix.platform.python-architecture }}-cargo-${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-${{ matrix.target }}-cargo-
- uses: actions/setup-python@v4
${{ runner.os }}-${{ matrix.platform.python-architecture }}-cargo-
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: ${{ matrix.python.version }}
architecture: ${{ matrix.platform.python-architecture }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
default: true
# - name: Install CLang
# uses: KyleMayes/install-llvm-action@v1
# with:
# version: "10.0"
# directory: ${{ runner.temp }}/llvm
- name: Install CLang
uses: KyleMayes/install-llvm-action@v1
with:
version: "15.0"
directory: ${{ runner.temp }}/llvm
- name: Install dependencies
run: pip install maturin pygithub
- name: Build package macOS
# env:
# CPLUS_INCLUDE_PATH: ${{ runner.temp }}/llvm/include/c++/v1/
run: cd oxen && maturin build --release --out dist --find-interpreter
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.target }}
# args: --release --out dist --find-interpreter
# sccache: 'true'
# working-directory: oxen
- name: Build package macOS x86
env:
PY_LOCATION: ${{ env.pythonLocation }}
CXXFLAGS: "-fno-aligned-allocation"
CPLUS_INCLUDE_PATH: ${{ runner.temp }}/llvm/include/c++/v1/
run: maturin build --release --out dist --interpreter ${PY_LOCATION}/bin/python
if: matrix.platform.rust-target == 'x86_64-apple-darwin'
- name: Build package macOS arm64
env:
PY_LOCATION: ${{ env.pythonLocation }}
run: maturin build --release --out dist --interpreter ${PY_LOCATION}/bin/python
if: matrix.platform.rust-target == 'aarch64-apple-darwin'
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

# sdist:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Build sdist
# uses: PyO3/maturin-action@v1
# with:
# command: sdist
# args: --out dist
# working-directory: oxen
# - name: Upload sdist
# uses: actions/upload-artifact@v3
# with:
# name: wheels
# path: dist
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
working-directory: oxen
- name: Upload sdist
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist

# release:
# name: Release
Expand Down

0 comments on commit 7995dc8

Please sign in to comment.