Skip to content
This repository has been archived by the owner on Mar 3, 2024. It is now read-only.

potato-pythonocc bulider #60

potato-pythonocc bulider

potato-pythonocc bulider #60

Workflow file for this run

name: potato-pythonocc bulider
on:
# pull_request:
# branches:
# - master
workflow_dispatch:
branches:
- master
# inputs:
# release_tag:
# description: 'release tag'
# required: true
jobs:
mambaforge:
name: mambaforge (${{ matrix.os }}, Mambaforge, Python${{ matrix.python-version }})
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: ["ubuntu", "macOS", "windows"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
include:
- os: ubuntu
miniforge-variant: Mambaforge
- os: macos
miniforge-variant: Mambaforge
- os: windows
miniforge-variant: Mambaforge
steps:
- name: Checkout master
uses: actions/checkout@v3
with:
ref: master
# 安装conda环境
- uses: conda-incubator/setup-miniconda@v2
with:
# condarc-file: ${{ matrix.condarc-file }}
miniforge-variant: ${{ matrix.miniforge-variant }}
miniforge-version: ${{ matrix.miniforge-version }}
# python-version: 3.11
python-version: ${{ matrix.python-version }}
use-mamba: true
# 安装一些依赖
- name: Get latest ninja
# Using 'v1' branch, the most recent ninja is installed. (1.10.2)
uses: urkle/action-get-ninja@v1
- name: Install Requirements & set python version
run: |
bash ci/conda/install_swig.sh
python3 -m pip install --user --upgrade pip
python3 -m pip install pyside2 pyqt5
mamba install numpy
mamba install conda-build anaconda-client
# touch ~/.bashrc
- name: set mac python ver
if: runner.os == 'macOS'
run: |
brew install gnu-sed
gsed -i "1i{% set python = '${{ matrix.python-version }}' %}" ./ci/conda/meta.yaml
tree /Users/runner/miniconda3/
# ls /Users/runner/miniconda3/bin
# echo "export PATH=\"/Users/runner/miniconda3/bin:$PATH\"" >> ~/.bashrc
# echo "export PATH=$PATH:/Users/runner/miniconda3/bin" >> ~/.bashrc
ln /Users/runner/miniconda3/bin/anaconda /Users/runner/miniconda3/condabin
- name: set other python ver
if: runner.os != 'macOS'
run: |
sed -i "1i{% set python = '${{ matrix.python-version }}' %}" ./ci/conda/meta.yaml
- name: set anaconda
if: runner.os == 'Linux'
run: |
ls /usr/share/miniconda3/
ls /usr/share/miniconda3/bin
# echo "export PATH=\"/usr/share/miniconda3/bin:$PATH\"" >> ~/.bashrc
# echo "export PATH=$PATH:/usr/share/miniconda3/bin" >> ~/.bashrc
sudo ln /usr/share/miniconda3/bin/anaconda /usr/bin
- name: test anaconda
run: |
anaconda -V
# - name: pack
# run: |
# conda build ci/conda/
# 编译并上传conda包
- name: Build and upload the conda packages
uses: uibcdf/[email protected]
with:
meta_yaml_dir: ci/conda/
python-version: ${{ matrix.python-version }}
user: ${{ secrets.CONDA_USER }}
label: dev
token: ${{ secrets.ANACONDA_TOKEN }}
overwrite: true
# 上传github release
# - name: Upload the artifacts
# uses: AButler/[email protected]
# with:
# # release_tag: ${{ steps.create_release.outputs.id }}
# # release_id: ${{ steps.create_release.outputs.id }}
# release-tag: ${{ github.event.inputs.release_tag }}
# files: 'environment-*'
# repo-token: ${{ secrets.GITHUB_TOKEN }}