Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy TAF | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
pull_request: | ||
branches: | ||
- '**' | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
architecture: ['x64', 'x86'] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Set up 32-bit Python on Windows | ||
if: matrix.os == 'windows-latest' && matrix.architecture == 'x86' | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: 'x86' | ||
- name: Install dependencies (Linux) | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
sudo apt-add-repository -y ppa:yubico/stable | ||
sudo apt-get update | ||
sudo apt-get install -qq libykpers-1-1 python-pyscard swig libpcsclite-dev | ||
pip install --upgrade pip | ||
displayName: "Linux setup" | ||
Check failure on line 44 in .github/workflows/deploy.yml GitHub Actions / Build and Deploy TAFInvalid workflow file
|
||
- name: Install dependencies (macOS) | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
brew update | ||
brew install ykpers libyubikey libusb swig openssl | ||
mkdir -p taf/libs | ||
wget -c https://developers.yubico.com/yubikey-personalization/Releases/ykpers-1.20.0-mac.zip -O - | tar -xz -C ./yk | ||
find ./yk/lib -name '*.dylib' -exec cp '{}' taf/libs ';' | ||
find /usr/local/Cellar/json-c/ -name '*.dylib' -exec cp '{}' taf/libs ';' | ||
rm -rf yk | ||
find /usr/local/Cellar/libusb/ -name '*.dylib' -exec cp '{}' taf/libs ';' | ||
install_name_tool -change @executable_path/../lib/libyubikey.0.dylib @loader_path/libyubikey.0.dylib taf/libs/libykpers-1.dylib | ||
install_name_tool -change @executable_path/../lib/libjson-c.2.dylib @loader_path/libjson-c.2.dylib taf/libs/libykpers-1.dylib | ||
displayName: "macOS setup" | ||
- name: Install dependencies (Windows x64) | ||
if: matrix.os == 'windows-latest' && matrix.architecture == 'x64' | ||
run: | | ||
choco install swig -y | ||
choco upgrade swig | ||
wget https://developers.yubico.com/yubikey-personalization/Releases/ykpers-1.20.0-win64.zip -OutFile "ykpers-1.20.0-win64.zip" | ||
7z x ykpers-1.20.0-win64.zip -o".\ykpers" | ||
Copy-Item ".\ykpers\bin\*.dll" ".\taf\libs" -Force -verbose | ||
wget https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.7z -OutFile "libusb-1.0.22.7z" | ||
7z x libusb-1.0.22.7z -o".\libusb" | ||
Copy-Item ".\libusb\MinGW64\dll\*.dll" ".\taf\libs" -Force -verbose | ||
displayName: "Windows setup (x64)" | ||
- name: Install dependencies (Windows x86) | ||
if: matrix.os == 'windows-latest' && matrix.architecture == 'x86' | ||
run: | | ||
echo "Skipping 32-bit setup on non-Windows OS" | ||
displayName: "Windows setup (x86)" | ||
- name: Install tools | ||
run: | | ||
python -m pip install --upgrade pip setuptools wheel | ||
- name: Build TAF | ||
run: | | ||
python setup.py sdist bdist_wheel clean --all | ||
- name: Copy files | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: wheels | ||
path: dist/ | ||
- name: Upload to TestPyPi | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
run: | | ||
python -m pip install twine | ||
twine upload --repository-url https://test.pypi.org/legacy/ dist/* | ||
env: | ||
TWINE_USERNAME: ${{ secrets.TESTPYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.TESTPYPI_PASSWORD }} | ||
# - name: Upload wheels to PyPI | ||
# if: startsWith(github.ref, 'refs/tags/v') | ||
# run: | | ||
# python -m pip install twine | ||
# twine check dist/* | ||
# twine upload --skip-existing dist/* -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} | ||
# env: | ||
# PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
# PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
# displayName: "Upload wheels" |