Skip to content

CI: avoid virtualenv v21, hatch doesn't like it. #208

CI: avoid virtualenv v21, hatch doesn't like it.

CI: avoid virtualenv v21, hatch doesn't like it. #208

Workflow file for this run

name: Builds
# TODO: generalize steps
env:
ARTIFACTS_FOLDER: '${{ github.workspace }}/artifacts'
DSS_CAPI_TAG: '0.15.0b4'
on:
# release:
# types: [created]
push:
jobs:
build_linux_x64:
continue-on-error: true
name: 'Linux x64'
runs-on: ubuntu-latest
strategy:
matrix:
include:
- container_image: 'quay.io/pypa/manylinux_2_28_x86_64'
SKIP_SCIPY: 0
# - container_image: 'quay.io/pypa/manylinux2014_x86_64'
# SKIP_SCIPY: 1
container:
image: ${{ matrix.container_image }}
env:
DSS_PYTHON_TEST_LINUX: '1'
SKIP_SCIPY: "${{ matrix.SKIP_SCIPY }}"
steps:
- name: 'Checkout DSS-Python'
run: |
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY dss_python
cd dss_python
git checkout $GITHUB_SHA
- name: 'Get electricdss-tst'
run: |
git clone --depth=1 https://github.com/dss-extensions/electricdss-tst.git
- name: 'Download/extract message catalogs'
run: |
curl -s -L https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_TAG}/messages.tar.gz -o messages.tar.gz
cd dss_python/dss
tar zxf ../../messages.tar.gz
- name: Build wheel
run: |
mkdir -p artifacts
mkdir -p artifacts_raw
bash dss_python/ci/build_linux.sh x64
- name: Install wheel
run: |
bash dss_python/ci/test_wheel.sh
- name: 'Upload artifacts'
uses: "actions/upload-artifact@v4"
if: ${{ matrix.container_image == 'quay.io/pypa/manylinux_2_28_x86_64' }}
with:
name: 'dss_python-wheel'
path: '${{ github.workspace }}/artifacts'
- name: Run tests (FastDSS)
shell: bash
run: |
export PATH=/opt/python/cp313-cp313/bin/:$PATH
cd dss_python
pip install cffi numpy pytest
DSS_EXTENSIONS_FASTDSS=1 python -m pytest
- name: Run tests (CFFI)
shell: bash
run: |
export PATH=/opt/python/cp313-cp313/bin/:$PATH
cd dss_python
pip install cffi numpy pytest
DSS_EXTENSIONS_FASTDSS=0 python -m pytest
build_macos_x64:
continue-on-error: true
name: 'macOS x64'
runs-on: 'macos-15-intel'
env:
PYTHON: python3
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
path: 'dss_python'
- name: "Get electricdss-tst"
uses: actions/checkout@v6
with:
fetch-depth: 1
repository: 'dss-extensions/electricdss-tst'
path: 'electricdss-tst'
- name: 'Prepare Python'
uses: actions/setup-python@v6
with:
python-version: '3.11'
cache: 'pip'
- name: 'Download/extract message catalogs'
run: |
curl -s -L https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_TAG}/messages.tar.gz -o messages.tar.gz
cd dss_python/dss
tar zxf ../../messages.tar.gz
- name: Build wheel
run: |
bash dss_python/ci/build_wheel.sh
- name: Install wheel
shell: bash
run: |
bash dss_python/ci/test_wheel.sh
- name: Run tests (FastDSS)
shell: bash
run: |
cd dss_python
DSS_EXTENSIONS_FASTDSS=1 python -m pytest
- name: Run tests (CFFI)
shell: bash
run: |
cd dss_python
DSS_EXTENSIONS_FASTDSS=0 python -m pytest
build_macos_arm64:
continue-on-error: true
name: 'macOS ARM64'
runs-on: 'macos-15'
env:
PYTHON: python3
ARCHFLAGS: '-arch arm64'
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
path: 'dss_python'
- name: "Get electricdss-tst"
uses: actions/checkout@v6
with:
fetch-depth: 1
repository: 'dss-extensions/electricdss-tst'
path: 'electricdss-tst'
- name: 'Prepare Python'
uses: actions/setup-python@v6
with:
python-version: '3.11'
cache: 'pip'
- name: 'Download/extract message catalogs'
run: |
curl -s -L https://github.com/dss-extensions/dss_capi/releases/download/${DSS_CAPI_TAG}/messages.tar.gz -o messages.tar.gz
cd dss_python/dss
tar zxf ../../messages.tar.gz
- name: Build wheel
run: |
bash dss_python/ci/build_wheel.sh
- name: Install wheel
shell: bash
run: |
bash dss_python/ci/test_wheel.sh
- name: Run tests (FastDSS)
shell: bash
run: |
cd dss_python
DSS_EXTENSIONS_FASTDSS=1 python -m pytest
- name: Run tests (CFFI)
shell: bash
run: |
cd dss_python
DSS_EXTENSIONS_FASTDSS=0 python -m pytest
build_win_x64:
continue-on-error: true
name: 'Windows x64'
runs-on: windows-latest
env:
PYTHON: python
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
path: 'dss_python'
- name: "Get electricdss-tst"
uses: actions/checkout@v6
with:
fetch-depth: 1
repository: 'dss-extensions/electricdss-tst'
path: 'electricdss-tst'
- name: 'Download/extract message catalogs'
shell: cmd
run: |
"c:\Program Files\Git\mingw64\bin\curl" -s -L https://github.com/dss-extensions/dss_capi/releases/download/%DSS_CAPI_TAG%/messages.zip -o messages.zip
cd dss_python\dss
tar zxf ..\..\messages.zip
- name: Build wheel
shell: bash
run: |
bash dss_python/ci/build_wheel.sh
- name: Install wheel
shell: bash
run: |
bash dss_python/ci/test_wheel.sh
- name: Run tests (FastDSS)
shell: cmd
run: |
set DSS_EXTENSIONS_FASTDSS=1
cd dss_python
python -m pytest
- name: Run tests (CFFI)
shell: cmd
run: |
set DSS_EXTENSIONS_FASTDSS=0
cd dss_python
python -m pytest
build_win_x86:
continue-on-error: true
name: 'Windows x86'
runs-on: windows-latest
env:
PYTHON: python
SKIP_SCIPY: '1'
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
path: 'dss_python'
- name: "Get electricdss-tst"
uses: actions/checkout@v6
with:
fetch-depth: 1
repository: 'dss-extensions/electricdss-tst'
path: 'electricdss-tst'
- name: 'Prepare Python'
uses: actions/setup-python@v6
with:
python-version: '3.11'
cache: 'pip'
architecture: 'x86'
- name: 'Download/extract message catalogs'
shell: cmd
run: |
"c:\Program Files\Git\mingw64\bin\curl" -s -L https://github.com/dss-extensions/dss_capi/releases/download/%DSS_CAPI_TAG%/messages.zip -o messages.zip
cd dss_python\dss
tar zxf ..\..\messages.zip
- name: Build wheel
shell: bash
run: |
bash dss_python/ci/build_wheel.sh
- name: Install wheel
shell: bash
run: |
bash dss_python/ci/test_wheel.sh
- name: Run tests (FastDSS)
shell: cmd
run: |
set DSS_EXTENSIONS_FASTDSS=1
cd dss_python
python -m pytest
- name: Run tests (CFFI)
shell: cmd
run: |
set DSS_EXTENSIONS_FASTDSS=0
cd dss_python
python -m pytest