Skip to content

Commit ae938ec

Browse files
committed
update GA
1 parent 3898649 commit ae938ec

File tree

3 files changed

+15
-75
lines changed

3 files changed

+15
-75
lines changed

.github/workflows/Build.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
name: Build (& Test)
1+
name: Build with Conda (not working)
22
on:
33
workflow_dispatch:
44
inputs:
55
debug_enabled:
66
description: 'Run workflow with ssh debugging'
77
required: false
88
default: false
9-
release:
10-
types: [published]
11-
12-
schedule:
13-
- cron: '0 0 * * 0'
149

1510
env:
1611
PACKAGE_NAME: pymer4

.github/workflows/manual_upload_conda.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: manual release conda
1+
name: Release with Conda (not used)
22
on: [workflow_dispatch]
33

44
env:

.github/workflows/manual_upload_pypi.yml

+13-68
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ on: [workflow_dispatch]
33

44
env:
55
PACKAGE_NAME: pymer4
6-
DEPLOY_PY_VER: 3.8 # only this job deploys docs, anaconda.org, pypi
7-
DEPLOY_OS: ubuntu-latest
8-
CONDA_BLD_PATH: /tmp/ci_conda_bld
96

107
defaults:
118
run:
@@ -18,82 +15,30 @@ jobs:
1815
runs-on: ${{ matrix.os }}
1916
strategy:
2017
matrix:
21-
py_ver: [3.7, 3.8, 3.9]
22-
os: [ubuntu-latest, macos-11] # Intel macs
23-
24-
outputs:
25-
# tarballs are py3X job-specific
26-
conda-tarball: ${{ steps.conda-bld.outputs.conda-tarball }}
18+
py_ver: [3.8]
19+
os: [ubuntu-latest]
2720

2821
steps:
29-
3022
# ------------------------------------------------------------
31-
# 0. Print some basic github action info
32-
- name: diagnostic info
33-
run: |
34-
echo "OS: ${{ matrix.os }}"
35-
echo "Python: ${{ matrix.py_ver }}"
36-
echo "Conda build path: $CONDA_BLD_PATH"
37-
echo "Deploy OS: $DEPLOY_OS"
38-
echo "Deploy Python: $DEPLOY_PY_VER"
39-
echo "GA event name: ${{ github.event_name }}"
40-
echo "GA ref: ${{ github.ref }}"
23+
# Step up miniconda
24+
- name: Download Miniconda
25+
uses: conda-incubator/setup-miniconda@059455a698430d8b68fa317268fa2e3da3492a98
26+
with:
27+
miniconda-version: "latest"
28+
python-version: ${{ matrix.py_ver }}
4129

4230
# ------------------------------------------------------------
43-
# 1. Grab git repo, setup miniconda environment and packages required to build
44-
- uses: actions/checkout@v2
45-
- name: Setup Miniconda + Checkout code
46-
run: |
47-
echo "GIT_ABBREV_COMMIT=_g${GITHUB_SHA:0:8}" >> $GITHUB_ENV
48-
49-
if [[ ${{ runner.os }} == Linux ]]; then \
50-
miniconda_url='https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh'; \
51-
fi
52-
if [[ ${{ runner.os }} == macOS ]]; then \
53-
miniconda_url='https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh'; \
54-
fi
55-
56-
wget $miniconda_url -O $HOME/miniconda.sh
57-
bash ~/miniconda.sh -b -p $HOME/miniconda
58-
hash -r
59-
$HOME/miniconda/bin/conda shell.bash hook >> ~/.bash_profile
60-
source ~/.bash_profile
61-
62-
hash -r
63-
conda config --set always_yes yes --set changeps1 no
64-
conda config --set bld_path $CONDA_BLD_PATH
65-
conda install -n base -q conda-build conda-verify anaconda-client
66-
echo "# ------------------------------------------------------------"
67-
conda info -a
68-
31+
# Get code
32+
- name: Checkout code
33+
uses: actions/checkout@v2
6934
# ------------------------------------------------------------
70-
# 2. Build the conda package and tarballs for each OS
71-
# env defined here are just for convenience when writing bash commands
72-
- name: Build package
73-
id: conda-bld
74-
env:
75-
OS: ${{ runner.os }}
76-
PY_VER: ${{ matrix.py_ver }}
35+
- name: Build and deploy to Pypi
7736
run: |
78-
conda build --python=$PY_VER -c conda-forge -c defaults conda
79-
tarball=$(conda build --python=$PY_VER conda --output | tail -1)
80-
if [[ $OS == "Linux" ]]; then \
81-
conda convert -p win-64 -o $CONDA_BLD_PATH $tarball; \
82-
fi
83-
echo "conda build tarball" $tarball
84-
echo "::set-output name=conda-tarball::$tarball"
85-
86-
# 6. Build package for PyPi (only for 3.8 linux which handles deployment)
87-
- name: Build for Pypi
88-
if: ${{ matrix.py_ver == env.DEPLOY_PY_VER && matrix.os == env.DEPLOY_OS }}
89-
run: |
90-
conda activate env_$PY_VER
9137
pip install build
9238
python -m build --sdist --wheel --outdir dist/
93-
39+
9440
# 7. Deploy package to Pypi (only need to do this once on linux)
9541
- name: PyPi deploy
96-
if: ${{ matrix.py_ver == env.DEPLOY_PY_VER && matrix.os == env.DEPLOY_OS }}
9742
uses: pypa/gh-action-pypi-publish@master
9843
with:
9944
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)