-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #351 from sot/release-builder
Added (pre-)release builder workflow
- Loading branch information
Showing
2 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |