Skip to content

onnx now optional, cmd line is ONNX_PATH=/Users/ngu/project/onnx/onnx… #426

onnx now optional, cmd line is ONNX_PATH=/Users/ngu/project/onnx/onnx…

onnx now optional, cmd line is ONNX_PATH=/Users/ngu/project/onnx/onnx… #426

name: Update conda package ubuntu
on:
push:
branches:
- 'master'
- 'package_test'
jobs:
build-conda-ubuntu:
runs-on: ubuntu-latest
container: rootproject/root:6.26.04-conda
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '12.x'
#- uses: s-weigand/setup-conda@v1
- name: Update meta
id: update_meta
working-directory: ./scripts/conda
run: |
echo "::set-output name=VERSION_CUTLANG::$(cat ../../VERSION)"
echo "::group::VERSION"
echo "Inside group $(cat ../../VERSION)"
echo "::endgroup::"
sed -i "/version = /c{% set version = '$(cat ../../VERSION)' %}" meta.yaml
sed -i "/cout << \"CLA v/c cout << \"CLA v$(cat ../../VERSION)\\\t\";" ../../CLA/CLA.Q
sed -i "/\"display_name\": \"ROOT C++ with CutLang/c \"display_name\": \"ROOT C++ with CutLang v$(cat ../../VERSION)\"," ../../scripts/jupyter/kernel/cutlangkernel.json
meta=`cat ../../scripts/conda/meta.yaml`
echo "::group::META"
echo "Inside group $meta"
echo "::endgroup::"
sed -i "/cutlang ==/c - cutlang ==$(cat ../../VERSION)" ../../binder/environment.yml
echo "::set-output name=CHECK_VERSION_CUTLANG::$(conda search -c ${{secrets.PACKAGE_USERNAME}} -f cutlang | grep $(cat ../../VERSION))"
echo "::set-output name=UNELG_REPO::$(git remote -v | grep -e 'origin.*unelg')"
- name: chmod
working-directory: .github/workflows
run: |
ls -la
chmod +x update_conda_package_ubuntu.sh
chmod +x update_conda_package_ubuntu_mail_success.js
chmod +x update_conda_package_ubuntu_mail_error.js
#- uses: s-weigand/setup-conda@v1
- name: Build and upload conda ubuntu
if: ${{ !steps.update_meta.outputs.CHECK_VERSION_CUTLANG }}
working-directory: ./.github/workflows
run: |
conda info
conda install -y anaconda-client conda-build
./update_conda_package_ubuntu.sh
env:
SUBDIR: "scripts/conda"
ANACONDA_TOKEN: "${{ secrets.ANACONDA_TOKEN }}"
PACKAGE_USERNAME: "${{ secrets.PACKAGE_USERNAME }}"
- name: automated update for binder environment.yml
if: ${{ !steps.update_meta.outputs.CHECK_VERSION_CUTLANG }}
working-directory: ./binder
run: |
ls -la
ls -la ..
ls -la ../scripts
ls -la ../CLA
ls -la ../scripts/conda
ls -la ../scripts/jupyter
rm -rf ../scripts/conda/meta.yaml
rm -rf ../CLA/CLA.Q
rm -rf ../scripts/jupyter/kernel/cutlangkernel.json
cat ./environment.yml
echo 00000
git config user.email "[email protected]"
git config user.name "bot"
echo 1111
git pull
echo 22222
git add ./environment.yml
echo 333333
git commit -m "automated update for binder environment.yml" || echo "ignore commit failure, proceed (simple warning)"
echo 444444
git push origin $1
echo 555555
- name: SMTP
if: ${{ !steps.update_meta.outputs.CHECK_VERSION_CUTLANG }}
uses: peter-evans/sendgrid-action@v1
env:
SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }}
SCRIPT_FILEPATH: ./.github/workflows/update_conda_package_ubuntu_mail_success.js