build multi-platform #28
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 multi-platform | |
on: | |
workflow_dispatch: | |
jobs: | |
job_1: | |
name: ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
#exclude: | |
# - os: ubuntu-latest | |
# - os: macos-latest | |
steps: | |
- name: git checkout | |
uses: actions/checkout@v4 | |
- name: build non-windows | |
if: runner.os != 'Windows' | |
run: | | |
eval "$(conda shell.bash activate)" | |
conda install -c conda-forge -y pyyaml jinja2 requests ninja | |
python setup.py -n all | |
- name: build windows | |
if: runner.os == 'Windows' | |
env: | |
CC: cl | |
run: | | |
#gmo -listavailable vssetup | |
#install-module vssetup | |
#get-vssetupinstance | |
#ls -l $env:programfiles/'Microsoft Visual Studio' | |
#ls $env:programfiles/'Microsoft Visual Studio' -recurse -filter *.DevShell.dll -file -name | |
#$env:path.split(';') | |
#ls -l $env:conda/shell/condabin | |
#ls -l env: | |
#echo "GITHUB_WORKSPACE: $env:GITHUB_WORKSPACE" | |
#echo "pwd: $(pwd)" | |
#iex "{$(& $env:CONDA/Scripts/conda shell.powershell activate)}" | |
& "$env:CONDA/shell/condabin/conda-hook.ps1" | |
& "$env:programfiles/Microsoft Visual Studio/2022/Enterprise/Common7/Tools/Launch-VsDevShell.ps1" -arch amd64 | |
conda activate $env:CONDA | |
conda install -c conda-forge -y pyyaml jinja2 requests ninja | |
#cmake --help | |
echo "cmake version: $(cmake --version)" | |
ls -l env: | |
echo "GITHUB_WORKSPACE: $env:GITHUB_WORKSPACE" | |
pushd $env:GITHUB_WORKSPACE | |
echo 'running python setup.py ... in $(pwd)' | |
python setup.py -n all | |
- name: upload macOS artifacts | |
uses: actions/upload-artifact@v4 | |
if: runner.os == 'macOS' | |
with: | |
retention-days: 3 | |
path: | | |
dist/sortmerna*Darwin.7z | |
dist/sortmerna*Darwin.sh | |
dist/sortmerna*Darwin.tar.gz | |
- name: upload linux artifacts | |
uses: actions/upload-artifact@v4 | |
if: runner.os == 'Linux' | |
with: | |
retention-days: 3 | |
path: | | |
dist/sortmerna*Linux.deb | |
dist/sortmerna*Linux.sh | |
dist/sortmerna*Linux.tar.gz | |
- name: upload windows artifacts | |
uses: actions/upload-artifact@v4 | |
if: runner.os == 'Windows' | |
with: | |
retention-days: 3 | |
path: | | |
dist/sortmerna*win64.7z |