Skip to content

Commit

Permalink
Merge pull request #351 from sot/release-builder
Browse files Browse the repository at this point in the history
Added (pre-)release builder workflow
  • Loading branch information
javierggt authored May 21, 2020
2 parents d792e1c + ac327be commit 2a699e5
Show file tree
Hide file tree
Showing 2 changed files with 136 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/build_prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Conda build pre-release
on:
release:
types:
- prereleased

jobs:
build-linux:
runs-on: ubuntu-latest
name: Build on Linux
steps:
- name: Login to GitHub Package Registry
run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }}
- name: Pull Docker image
run: docker pull docker.pkg.github.com/sot/skare3/centos5-builder:latest
- name: Build
id: build
run: >
docker run --rm --name builder -v $GITHUB_WORKSPACE:/github/workspace -w /github/workspace -e CONDA_PASSWORD -e GIT_USERNAME -e GIT_PASSWORD docker.pkg.github.com/sot/skare3/centos5-builder:latest ska3-template --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA} --skare3-overwrite-version ${GITHUB_REF}
docker run --rm --name builder -v $GITHUB_WORKSPACE:/github/workspace -w /github/workspace -e CONDA_PASSWORD -e GIT_USERNAME -e GIT_PASSWORD docker.pkg.github.com/sot/skare3/centos5-builder:latest ska3-core --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA} --skare3-overwrite-version ${GITHUB_REF}
docker run --rm --name builder -v $GITHUB_WORKSPACE:/github/workspace -w /github/workspace -e CONDA_PASSWORD -e GIT_USERNAME -e GIT_PASSWORD docker.pkg.github.com/sot/skare3/centos5-builder:latest ska3-flight --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA} --skare3-overwrite-version ${GITHUB_REF}
docker run --rm --name builder -v $GITHUB_WORKSPACE:/github/workspace -w /github/workspace -e CONDA_PASSWORD -e GIT_USERNAME -e GIT_PASSWORD docker.pkg.github.com/sot/skare3/centos5-builder:latest ska3-matlab --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA} --skare3-overwrite-version ${GITHUB_REF}
docker run --rm --name builder -v $GITHUB_WORKSPACE:/github/workspace -w /github/workspace -e CONDA_PASSWORD -e GIT_USERNAME -e GIT_PASSWORD docker.pkg.github.com/sot/skare3/centos5-builder:latest ska3-pinned --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA} --skare3-overwrite-version ${GITHUB_REF}
docker run --rm --name builder -v $GITHUB_WORKSPACE:/github/workspace -w /github/workspace -e CONDA_PASSWORD -e GIT_USERNAME -e GIT_PASSWORD docker.pkg.github.com/sot/skare3/centos5-builder:latest ska3-perl --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA} --skare3-overwrite-version ${GITHUB_REF}
env:
CONDA_PASSWORD: ${{ secrets.CONDA_PASSWORD }}
GIT_USERNAME: chandra-xray
GIT_PASSWORD: ${{ secrets.CHANDRA_XRAY_TOKEN }}
GIT_ASKPASS: /home/aca/git_pass.py
- uses: sot/skare3_tools/actions/gdrive_upload@master
name: Upload to Google Drive
with:
files: |
builds/linux-64
builds/noarch
directory: /ska3/conda-test-releases
options: --drive=cxc_ops
env:
GOOGLE_DRIVE_CREDENTIALS: ${{ secrets.GOOGLE_DRIVE_CREDENTIALS }}


build-macos:
runs-on: macos-latest
name: Build on Mac OS
steps:
- name: Fetch Skare3 Tools
uses: actions/checkout@v2
with:
repository: sot/skare3_tools
ref: master
path: skare3_tools
- name: Build
run: |
source ./skare3_tools/actions/build/files/setup_conda.sh
./skare3_tools/actions/build/files/build.py ska3-core --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA} --skare3-overwrite-version ${GITHUB_REF}
./skare3_tools/actions/build/files/build.py ska3-perl --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA} --skare3-overwrite-version ${GITHUB_REF}
env:
CONDA_PASSWORD: ${{ secrets.CONDA_PASSWORD }}
GIT_USER: chandra-xray
GIT_ASKPASS: skare3_tools/actions/build/files/git_pass.py
GIT_PASSWORD: ${{ secrets.CHANDRA_XRAY_TOKEN }}
- name: Upload to Google Drive
run: |
sudo pip3 install -r ./skare3_tools/requirements.txt
sudo pip3 install ./skare3_tools
gdrive --batch upload ./builds/osx-64 /ska3/conda-test-releases --drive cxc_ops
env:
GOOGLE_DRIVE_CREDENTIALS: ${{ secrets.GOOGLE_DRIVE_CREDENTIALS }}
68 changes: 68 additions & 0 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Conda build release
on:
release:
types:
- released

jobs:
build-linux:
runs-on: ubuntu-latest
name: Build on Linux
steps:
- name: Login to GitHub Package Registry
run: docker login docker.pkg.github.com -u $GITHUB_ACTOR -p ${{ secrets.GITHUB_TOKEN }}
- name: Pull Docker image
run: docker pull docker.pkg.github.com/sot/skare3/centos5-builder:latest
- name: Build
id: build
run: >
docker run --rm --name builder -v $GITHUB_WORKSPACE:/github/workspace -w /github/workspace -e CONDA_PASSWORD -e GIT_USERNAME -e GIT_PASSWORD docker.pkg.github.com/sot/skare3/centos5-builder:latest ska3-template --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA}
docker run --rm --name builder -v $GITHUB_WORKSPACE:/github/workspace -w /github/workspace -e CONDA_PASSWORD -e GIT_USERNAME -e GIT_PASSWORD docker.pkg.github.com/sot/skare3/centos5-builder:latest ska3-core --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA}
docker run --rm --name builder -v $GITHUB_WORKSPACE:/github/workspace -w /github/workspace -e CONDA_PASSWORD -e GIT_USERNAME -e GIT_PASSWORD docker.pkg.github.com/sot/skare3/centos5-builder:latest ska3-flight --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA}
docker run --rm --name builder -v $GITHUB_WORKSPACE:/github/workspace -w /github/workspace -e CONDA_PASSWORD -e GIT_USERNAME -e GIT_PASSWORD docker.pkg.github.com/sot/skare3/centos5-builder:latest ska3-matlab --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA}
docker run --rm --name builder -v $GITHUB_WORKSPACE:/github/workspace -w /github/workspace -e CONDA_PASSWORD -e GIT_USERNAME -e GIT_PASSWORD docker.pkg.github.com/sot/skare3/centos5-builder:latest ska3-pinned --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA}
docker run --rm --name builder -v $GITHUB_WORKSPACE:/github/workspace -w /github/workspace -e CONDA_PASSWORD -e GIT_USERNAME -e GIT_PASSWORD docker.pkg.github.com/sot/skare3/centos5-builder:latest ska3-perl --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA}
env:
CONDA_PASSWORD: ${{ secrets.CONDA_PASSWORD }}
GIT_USERNAME: chandra-xray
GIT_PASSWORD: ${{ secrets.CHANDRA_XRAY_TOKEN }}
GIT_ASKPASS: /home/aca/git_pass.py
- uses: sot/skare3_tools/actions/gdrive_upload@master
name: Upload to Google Drive
with:
files: |
builds/linux-64
builds/noarch
directory: /ska3/conda-main
options: --drive=cxc_ops
env:
GOOGLE_DRIVE_CREDENTIALS: ${{ secrets.GOOGLE_DRIVE_CREDENTIALS }}


build-macos:
runs-on: macos-latest
name: Build on Mac OS
steps:
- name: Fetch Skare3 Tools
uses: actions/checkout@v2
with:
repository: sot/skare3_tools
ref: master
path: skare3_tools
- name: Build
run: |
source ./skare3_tools/actions/build/files/setup_conda.sh
./skare3_tools/actions/build/files/build.py ska3-core --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA}
./skare3_tools/actions/build/files/build.py ska3-perl --tag ${GITHUB_SHA} --skare3-branch ${GITHUB_SHA}
env:
CONDA_PASSWORD: ${{ secrets.CONDA_PASSWORD }}
GIT_USER: chandra-xray
GIT_ASKPASS: skare3_tools/actions/build/files/git_pass.py
GIT_PASSWORD: ${{ secrets.CHANDRA_XRAY_TOKEN }}
- name: Upload to Google Drive
run: |
sudo pip3 install -r ./skare3_tools/requirements.txt
sudo pip3 install ./skare3_tools
gdrive --batch upload ./builds/linux-64 /ska3/conda-main --drive cxc_ops
env:
GOOGLE_DRIVE_CREDENTIALS: ${{ secrets.GOOGLE_DRIVE_CREDENTIALS }}

0 comments on commit 2a699e5

Please sign in to comment.