From c2f0ce323ad032d1eecc62b462c6ab4d23b36781 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Fri, 15 May 2020 15:31:52 -0400 Subject: [PATCH 1/5] added pre-release builder workflow --- .github/workflows/build.yml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..6146f8b5 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: Conda build +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 }} + From 7aef0ae1f0b9f82f559d97e2cbc9f1dbf60f0666 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Fri, 15 May 2020 16:11:36 -0400 Subject: [PATCH 2/5] rename workflow --- .github/workflows/{build.yml => build_prerelease.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{build.yml => build_prerelease.yml} (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build_prerelease.yml similarity index 100% rename from .github/workflows/build.yml rename to .github/workflows/build_prerelease.yml From 6f415d3fd66b416ee556655a805f8ed033539855 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Fri, 15 May 2020 19:51:42 -0400 Subject: [PATCH 3/5] build release workflow --- .github/workflows/build_release.yml | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/build_release.yml diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml new file mode 100644 index 00000000..13ebeb38 --- /dev/null +++ b/.github/workflows/build_release.yml @@ -0,0 +1,40 @@ +name: Conda build +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 }} + From 85c1308228e9f7c98557afc31d90b728c6060cfa Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Fri, 15 May 2020 20:07:00 -0400 Subject: [PATCH 4/5] added (pre-)release build on macos-64 --- .github/workflows/build_prerelease.yml | 30 +++++++++++++++++++++++++- .github/workflows/build_release.yml | 30 +++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_prerelease.yml b/.github/workflows/build_prerelease.yml index 6146f8b5..4ed31883 100644 --- a/.github/workflows/build_prerelease.yml +++ b/.github/workflows/build_prerelease.yml @@ -1,4 +1,4 @@ -name: Conda build +name: Conda build pre-release on: release: types: @@ -38,3 +38,31 @@ jobs: 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 }} \ No newline at end of file diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 13ebeb38..ad830c32 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -1,4 +1,4 @@ -name: Conda build +name: Conda build release on: release: types: @@ -38,3 +38,31 @@ jobs: 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 }} From ac327be33731fda52abac30a682ed0b1c903963e Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Fri, 15 May 2020 20:17:04 -0400 Subject: [PATCH 5/5] missing line at end of file --- .github/workflows/build_prerelease.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_prerelease.yml b/.github/workflows/build_prerelease.yml index 4ed31883..41b217e4 100644 --- a/.github/workflows/build_prerelease.yml +++ b/.github/workflows/build_prerelease.yml @@ -65,4 +65,4 @@ jobs: 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 }} \ No newline at end of file + GOOGLE_DRIVE_CREDENTIALS: ${{ secrets.GOOGLE_DRIVE_CREDENTIALS }}