Skip to content

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #152

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #152

# good example https://github.com/thenewguy/django-randomfields/blob/master/.github/workflows/sdist.yml
name: ctypeslib-linux
on: [push, pull_request]
jobs:
check-package-build:
name: Build & inspect our package.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# get all history and tags for setuptools_scm to find the right version
fetch-depth: 0
- name: Install build dependencies
run: |
pip install setuptools setuptools_scm wheel build
- name: Build package wheel
run: python -m build -w
- name: Upload built artifacts.
uses: actions/upload-artifact@v3
# By default, the artifacts and log files generated by workflows are retained for 90 days before they are automatically deleted.
with:
name: Packages
path: ./dist/*
# - uses: hynek/build-and-inspect-python-package@v1
# id: build-package
# packages are uploaded to Packages
test:
needs: check-package-build
runs-on: ubuntu-latest
strategy:
matrix:
# os: [ubuntu-latest, macos-latest, windows-latest]
# python-version: [ 3.5, 3.6, 3.7, 3.8, 3.9 ]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
clang-version: ['11', '12', '13', '14', '15']
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Clang
uses: egor-tensin/setup-clang@v1
with:
version: ${{ matrix.clang-version }}
platform: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools setuptools_scm clang==${{ matrix.clang-version }}.* coveralls coverage[toml]
- name: build test libs
run: |
CFLAGS="-Wall -Wextra -Werror -std=c99 -pedantic -fpic"
LDFLAGS="-shared"
clang $CFLAGS $LDFLAGS -o test/data/test-callbacks.so test/data/test-callbacks.c
- name: Show LD_LIBRARY_PATH
run: |
echo $LD_LIBRARY_PATH
echo $PWD
echo $(pwd)
echo ${{runner.os == 'Linux' }}
- name: Update Linux LD_LIBRARY_PATH
if: ${{runner.os == 'Linux' }}
run: |
echo "LD_LIBRARY_PATH=$(pwd)/test/data/:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Update Windows PATH
if: ${{runner.os == 'Windows' }}
run: |
echo "PATH=$(pwd)/test/data/:$Env:PATH" >> $GITHUB_ENV
- name: Update macOS PATH
if: ${{runner.os == 'macOS' }}
run: |
echo "DYLD_LIBRARY_PATH=$(pwd)/test/data/:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV
- uses: actions/[email protected]
with:
name: Packages
path: ~/packages/
- name: Install the package that was built
run: |
pip install ~/packages/ctypeslib2*.whl
- name: Show the versions involved
run: clang2py --version
- name: Run tests with Unittest and coverage
run: |
coverage run --source=ctypeslib -m unittest test.alltests
- name: Coveralls
uses: coverallsapp/github-action@v2
with:
parallel: true
flag-name: run-${{ join(matrix.*, ' - ') }}
coveralls_finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true