Skip to content

Update python_build_all_os.yml #15

Update python_build_all_os.yml

Update python_build_all_os.yml #15

name: Python Package using Conda
on:
push:
tags:
- 'v*.*.*'
env:
python_version: '3.10'
defaults:
run:
shell: bash -l {0}
jobs:
Run-on-ubuntu:
name: run on ubuntu
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{env.python_version}}
uses: actions/setup-python@v4
with:
python-version: ${{env.python_version}}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
channels: conda-forge, defaults
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
auto-update-conda: true
auto-activate-base: true
# - name: Install numpy
# run: |
# conda install --channel conda-forge numpy
- name: Install pydantic
run: |
conda install --channel conda-forge pydantic
- name: Install pyscipopt
run: |
conda install --channel conda-forge pyscipopt
- name: Install cx_freeze
run: |
conda install --channel conda-forge cx_freeze
- name: Build Files
run: |
python setup.py build
git status --porcelain
- name: Zip build folder
uses: montudor/action-zip@v1
with:
args: zip -qq -r ${{format('{0}_linux.zip', github.ref_name)}} build/exe.linux-x86_64-3.11
- name: Create GitHub Release
uses: ncipollo/[email protected]
with:
artifacts: ${{format('{0}_linux.zip', github.ref_name)}}
body: "TODO Document me!"
allowUpdates: true
Run-on-mac:
name: run on mac
permissions:
contents: write
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{env.python_version}}
uses: actions/setup-python@v4
with:
python-version: ${{env.python_version}}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
channels: conda-forge, defaults
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
auto-update-conda: true
auto-activate-base: true
# - name: Install numpy
# run: |
# conda install --channel conda-forge numpy
- name: Install pydantic
run: |
conda install --channel conda-forge pydantic
- name: Install pyscipopt
run: |
conda install --channel conda-forge pyscipopt
- name: Install cx_freeze
run: |
conda install --channel conda-forge cx_freeze
- name: Build Files
run: |
python setup.py build
git status --porcelain
- name: Zip build folder
run: zip -r ${{format('{0}_macos.zip', github.ref_name)}} build/exe.macosx-10.9-x86_64-3.11
- name: Create GitHub Release
uses: ncipollo/[email protected]
with:
artifacts: ${{format('{0}_macos.zip', github.ref_name)}}
body: "TODO Document me!"
allowUpdates: true
Run-on-windows:
name: run on windows
runs-on: windows-latest
permissions: write-all
defaults:
run:
shell: PowerShell
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{env.python_version}}
uses: actions/setup-python@v4
with:
python-version: ${{env.python_version}}
- uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
channels: conda-forge, defaults
use-only-tar-bz2: true # IMPORTANT: This needs to be set for caching to work properly!
auto-update-conda: true
auto-activate-base: true
# - name: Install numpy
# run: |
# conda install --channel conda-forge numpy
- name: Install pydantic
run: |
conda install --channel conda-forge pydantic
- name: Install pyscipopt
run: |
conda install --channel conda-forge pyscipopt
- name: Install cx_freeze
run: |
conda install --channel conda-forge cx_freeze
- name: Build Files
run: |
python setup.py build
- name: Zip build folder
run: Compress-Archive build/exe.win-amd64-3.11 ${{format('{0}_windows.zip', github.ref_name)}}
- name: Create GitHub Release
uses: ncipollo/[email protected]
with:
artifacts: ${{format('{0}_windows.zip', github.ref_name)}}
body: "TODO Document me!"
allowUpdates: true