2021-03-10 17:17:41 -05:00
|
|
|
name: Build radioconda
|
2021-03-19 18:16:26 -04:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- "installer_specs/**"
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- "installer_specs/**"
|
2021-05-19 17:28:50 -04:00
|
|
|
workflow_dispatch:
|
2021-03-10 17:17:41 -05:00
|
|
|
|
|
|
|
env:
|
|
|
|
DISTNAME: radioconda
|
2021-05-20 18:06:46 -04:00
|
|
|
LICENSE_ID: BSD-3-Clause
|
2021-05-21 13:33:39 -04:00
|
|
|
METAPACKAGE_LABEL: dev
|
2021-05-20 18:06:46 -04:00
|
|
|
METAPACKAGE_SUMMARY: Metapackage to install the radioconda package set.
|
2021-03-10 17:17:41 -05:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: ${{ matrix.PLATFORM }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: ubuntu-latest
|
|
|
|
PLATFORM: linux-64
|
|
|
|
OS_NAME: Linux
|
|
|
|
ARCH: x86_64
|
2021-05-21 19:22:28 -04:00
|
|
|
# - os: ubuntu-latest
|
|
|
|
# PLATFORM: linux-aarch64
|
|
|
|
# OS_NAME: Linux
|
|
|
|
# ARCH: aarch64
|
|
|
|
# - os: ubuntu-latest
|
|
|
|
# PLATFORM: linux-ppc64le
|
|
|
|
# OS_NAME: Linux
|
|
|
|
# ARCH: ppc64le
|
2021-03-10 17:17:41 -05:00
|
|
|
- os: macos-latest
|
|
|
|
PLATFORM: osx-64
|
|
|
|
OS_NAME: MacOSX
|
|
|
|
ARCH: x86_64
|
2021-05-21 19:22:28 -04:00
|
|
|
# - os: macos-latest
|
|
|
|
# PLATFORM: osx-arm64
|
|
|
|
# OS_NAME: MacOSX
|
|
|
|
# ARCH: arm64
|
2021-03-10 17:17:41 -05:00
|
|
|
- os: windows-latest
|
|
|
|
PLATFORM: win-64
|
|
|
|
OS_NAME: Windows
|
|
|
|
ARCH: x86_64
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2021-03-12 12:35:30 -05:00
|
|
|
- name: Install coreutils for macOS
|
|
|
|
if: runner.os == 'macOS'
|
|
|
|
run: brew install coreutils
|
|
|
|
|
2021-03-10 17:17:41 -05:00
|
|
|
- name: Install python environment
|
|
|
|
uses: mamba-org/provision-with-micromamba@main
|
|
|
|
with:
|
|
|
|
environment-file: buildenv.yaml
|
|
|
|
|
2021-05-21 12:39:58 -04:00
|
|
|
- name: Build installer
|
2021-03-10 17:17:41 -05:00
|
|
|
shell: bash -l {0}
|
|
|
|
env:
|
|
|
|
PLATFORM: ${{ matrix.PLATFORM }}
|
2021-05-21 12:10:30 -04:00
|
|
|
OS_NAME: ${{ matrix.OS_NAME }}
|
2021-03-10 17:17:41 -05:00
|
|
|
run: |
|
2021-05-21 12:10:30 -04:00
|
|
|
if [ "$OS_NAME" == "Windows" ]; then
|
|
|
|
PATH=$CONDA_PREFIX/NSIS:$PATH
|
|
|
|
fi
|
2021-05-21 19:22:28 -04:00
|
|
|
python build_installer.py -- -v
|
2021-03-10 17:17:41 -05:00
|
|
|
|
2021-05-20 18:06:46 -04:00
|
|
|
- name: Build metapackage
|
|
|
|
shell: bash -l {0}
|
2021-03-10 17:17:41 -05:00
|
|
|
env:
|
|
|
|
PLATFORM: ${{ matrix.PLATFORM }}
|
|
|
|
run: |
|
2021-05-21 16:00:54 -04:00
|
|
|
python build_metapackage.py
|
2021-03-10 17:17:41 -05:00
|
|
|
|
2021-05-21 12:39:58 -04:00
|
|
|
- name: Copy lock file and list built installers and packages
|
2021-03-10 17:17:41 -05:00
|
|
|
shell: bash
|
2021-03-23 15:56:58 -04:00
|
|
|
env:
|
|
|
|
PLATFORM: ${{ matrix.PLATFORM }}
|
2021-03-10 17:17:41 -05:00
|
|
|
run: |
|
2021-05-21 16:00:54 -04:00
|
|
|
cp installer_specs/$DISTNAME-$PLATFORM.lock dist/
|
2021-05-20 18:06:46 -04:00
|
|
|
ls -lhR dist
|
2021-03-10 17:17:41 -05:00
|
|
|
|
|
|
|
- name: Test installer (sh)
|
|
|
|
if: contains(matrix.OS_NAME, 'Linux') || contains(matrix.OS_NAME, 'MacOSX')
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
OS_NAME: ${{ matrix.OS_NAME }}
|
|
|
|
ARCH: ${{ matrix.ARCH }}
|
|
|
|
INSTALL_PATH: ${{ github.workspace }}/test_installation
|
|
|
|
run: |
|
|
|
|
bash dist/$DISTNAME-*-$OS_NAME-$ARCH.sh -b -p $INSTALL_PATH
|
|
|
|
eval "$($INSTALL_PATH/bin/conda shell.bash hook)"
|
|
|
|
conda info
|
|
|
|
conda list
|
|
|
|
|
|
|
|
- name: Test installer (pkg)
|
|
|
|
if: contains(matrix.OS_NAME, 'MacOSX')
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
OS_NAME: ${{ matrix.OS_NAME }}
|
|
|
|
ARCH: ${{ matrix.ARCH }}
|
|
|
|
TARGET_VOLUME: CurrentUserHomeDirectory
|
2021-05-19 19:03:45 -04:00
|
|
|
INSTALL_PATH: ${{ github.workspace }}/../../../${{ env.DISTNAME }}
|
2021-03-10 17:17:41 -05:00
|
|
|
run: |
|
2021-05-21 12:39:58 -04:00
|
|
|
cat >pkg-choices.xml <<EOF
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
|
|
<plist version="1.0">
|
|
|
|
<array>
|
|
|
|
<dict>
|
|
|
|
<key>attributeSetting</key>
|
|
|
|
<integer>0</integer>
|
|
|
|
<key>choiceAttribute</key>
|
|
|
|
<string>selected</string>
|
|
|
|
<key>choiceIdentifier</key>
|
|
|
|
<string>io.continuum.pkg.pathupdate</string>
|
|
|
|
</dict>
|
|
|
|
</array>
|
|
|
|
</plist>
|
|
|
|
EOF
|
|
|
|
installer -verbose -dumplog -applyChoiceChangesXML pkg-choices.xml -pkg dist/$DISTNAME-*-$OS_NAME-$ARCH.pkg -target $TARGET_VOLUME
|
2021-03-10 17:17:41 -05:00
|
|
|
eval "$($INSTALL_PATH/bin/conda shell.bash hook)"
|
|
|
|
conda info
|
|
|
|
conda list
|
|
|
|
|
|
|
|
- name: Test installer (exe)
|
|
|
|
if: contains(matrix.OS_NAME, 'Windows')
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
OS_NAME: ${{ matrix.OS_NAME }}
|
|
|
|
ARCH: ${{ matrix.ARCH }}
|
|
|
|
INSTALL_PATH_W: ${{ github.workspace }}\test_installation
|
|
|
|
run: |
|
|
|
|
INSTALL_PATH=$(cygpath -u $INSTALL_PATH_W)
|
|
|
|
INSTALLER_EXE="dist/$DISTNAME-*-$OS_NAME-$ARCH.exe"
|
|
|
|
INSTALLER_EXE_W=$(cygpath -w $INSTALLER_EXE)
|
|
|
|
echo "start /wait \"\" $INSTALLER_EXE_W /InstallationType=JustMe /RegisterPython=0 /S /D=$INSTALL_PATH_W" > install.bat
|
|
|
|
cmd.exe /c install.bat
|
|
|
|
source $INSTALL_PATH/Scripts/activate
|
|
|
|
conda info
|
|
|
|
conda list
|
|
|
|
|
2021-03-12 12:25:47 -05:00
|
|
|
- name: Calculate sha256 hash
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
OS_NAME: ${{ matrix.OS_NAME }}
|
|
|
|
ARCH: ${{ matrix.ARCH }}
|
|
|
|
run: |
|
2021-03-12 12:56:07 -05:00
|
|
|
cd dist
|
|
|
|
for INSTALLER_PATH in $DISTNAME-*-$OS_NAME-$ARCH.*; do
|
2021-03-12 12:25:47 -05:00
|
|
|
HASH_PATH="$INSTALLER_PATH.sha256"
|
|
|
|
sha256sum $INSTALLER_PATH > $HASH_PATH
|
2021-03-12 12:35:30 -05:00
|
|
|
cat $HASH_PATH
|
2021-03-12 12:25:47 -05:00
|
|
|
done
|
|
|
|
|
2021-03-10 17:17:41 -05:00
|
|
|
- name: Upload to Github artifact
|
|
|
|
if: ${{ (success() || failure()) && !startsWith(github.ref, 'refs/tags/') }}
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
path: dist/*
|
|
|
|
name: ${{ matrix.OS_NAME }}-${{ matrix.ARCH }}
|
|
|
|
|
|
|
|
- name: Upload to release
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
uses: svenstaro/upload-release-action@v2
|
|
|
|
with:
|
|
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
file: dist/*
|
|
|
|
tag: ${{ github.ref }}
|
|
|
|
overwrite: true
|
|
|
|
file_glob: true
|
2021-05-20 18:06:46 -04:00
|
|
|
|
|
|
|
- name: Upload metapackage to Anaconda.org
|
2021-05-21 13:25:30 -04:00
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
2021-05-20 18:06:46 -04:00
|
|
|
shell: bash -l {0}
|
|
|
|
env:
|
|
|
|
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
|
|
|
|
run: |
|
2021-05-21 12:39:58 -04:00
|
|
|
micromamba --help
|
|
|
|
anaconda upload -l $METAPACKAGE_LABEL --skip-existing dist/conda-bld/**/*
|