From a938cc1d290ba8be761b174ef80038e605c93036 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Tue, 18 Aug 2020 17:44:38 -0400 Subject: [PATCH 1/3] Updating build workflow --- .github/workflows/build-arch.yml | 102 +++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 .github/workflows/build-arch.yml diff --git a/.github/workflows/build-arch.yml b/.github/workflows/build-arch.yml new file mode 100644 index 0000000..3efc5db --- /dev/null +++ b/.github/workflows/build-arch.yml @@ -0,0 +1,102 @@ +name: Conda build +on: + push: + branches: + - master + release: + types: + - created + repository_dispatch: + types: + - conda-build + +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/centos7-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/centos7-builder:latest + ${GITHUB_REPOSITORY} --tag ${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 + - name: Save package + uses: actions/upload-artifact@v2 + with: + name: conda-package + path: | + builds/noarch/ + builds/linux-64/ + !builds/*/*repodata* + !builds/*/index.html + + + build-other: + runs-on: ${{ matrix.os }}-latest + name: Build on ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["macos", "windows"] + steps: + - name: Fetch Skare3-tools + uses: actions/checkout@v2 + with: + repository: sot/skare3_tools + ref: master + path: skare3_tools + - uses: sot/setup-miniconda@v1 + with: + miniconda-version: "py38_4.8.3" + python-version: "3.8" + channels: https://ska:${{ secrets.CONDA_PASSWORD }}@cxc.cfa.harvard.edu/mta/ASPECT/ska3-conda/shiny + - name: Build Dependencies + shell: bash -l {0} + run: conda install setuptools_scm gitpython conda-build jinja2 pyyaml python=3.8 numpy packaging + - name: Build Package + shell: bash -l {0} + run: | + python skare3_tools/actions/build/files/build.py --arch-specific ${GITHUB_REPOSITORY} --tag ${GITHUB_SHA} + env: + CONDA_PASSWORD: ${{ secrets.CONDA_PASSWORD }} + GIT_USERNAME: chandra-xray + GIT_ASKPASS: ${{ github.workspace }}/skare3_tools/actions/build/files/git_pass.py + GIT_PASSWORD: ${{ secrets.CHANDRA_XRAY_TOKEN }} + - name: Save package + uses: actions/upload-artifact@v2 + with: + name: conda-package + path: | + builds/noarch/ + builds/osx-64/ + builds/win-64/ + !builds/*/*repodata* + !builds/*/index.html + + update-channel: + runs-on: head + name: Update Conda Channel + needs: [build-linux, build-other] + steps: + - name: Get linux package + uses: actions/download-artifact@v2 + with: + name: conda-package + path: package + - name: Update channel + run: | + rsync -a package/ ${CONDA_CHANNEL_DIR} + for d in ${CONDA_CHANNEL_DIR}/*; do conda index $d; done; + env: + CONDA_CHANNEL_DIR: /proj/sot/ska/www/ASPECT/ska3-conda/masters From fecf9c1e8fd6aed982f3b89b87374336f77476c7 Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Tue, 18 Aug 2020 18:35:25 -0400 Subject: [PATCH 2/3] Updating build workflow --- .github/workflows/build.yml | 85 +++++++++++++++++++++++++------------ 1 file changed, 58 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3be2534..3efc5db 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,54 +18,85 @@ jobs: - 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 + run: docker pull docker.pkg.github.com/sot/skare3/centos7-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 + docker.pkg.github.com/sot/skare3/centos7-builder:latest ${GITHUB_REPOSITORY} --tag ${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 + - name: Save package + uses: actions/upload-artifact@v2 with: - files: | - builds/linux-64 - builds/noarch - directory: /ska3/conda-test - options: --drive=cxc_ops - env: - GOOGLE_DRIVE_CREDENTIALS: ${{ secrets.GOOGLE_DRIVE_CREDENTIALS }} + name: conda-package + path: | + builds/noarch/ + builds/linux-64/ + !builds/*/*repodata* + !builds/*/index.html - build-macos: - runs-on: macos-latest - name: Build on Mac OS + build-other: + runs-on: ${{ matrix.os }}-latest + name: Build on ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["macos", "windows"] steps: - - name: Fetch Skare3 Tools + - name: Fetch Skare3-tools uses: actions/checkout@v2 with: repository: sot/skare3_tools ref: master path: skare3_tools - - name: Build + - uses: sot/setup-miniconda@v1 + with: + miniconda-version: "py38_4.8.3" + python-version: "3.8" + channels: https://ska:${{ secrets.CONDA_PASSWORD }}@cxc.cfa.harvard.edu/mta/ASPECT/ska3-conda/shiny + - name: Build Dependencies + shell: bash -l {0} + run: conda install setuptools_scm gitpython conda-build jinja2 pyyaml python=3.8 numpy packaging + - name: Build Package + shell: bash -l {0} run: | - source ./skare3_tools/actions/build/files/setup_conda.sh - ./skare3_tools/actions/build/files/build.py ${GITHUB_REPOSITORY} --tag ${GITHUB_SHA} + python skare3_tools/actions/build/files/build.py --arch-specific ${GITHUB_REPOSITORY} --tag ${GITHUB_SHA} env: CONDA_PASSWORD: ${{ secrets.CONDA_PASSWORD }} - GIT_USER: chandra-xray - GIT_ASKPASS: skare3_tools/actions/build/files/git_pass.py + GIT_USERNAME: chandra-xray + GIT_ASKPASS: ${{ github.workspace }}/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 ./builds/noarch /ska3/conda-test --drive cxc_ops - env: - GOOGLE_DRIVE_CREDENTIALS: ${{ secrets.GOOGLE_DRIVE_CREDENTIALS }} + - name: Save package + uses: actions/upload-artifact@v2 + with: + name: conda-package + path: | + builds/noarch/ + builds/osx-64/ + builds/win-64/ + !builds/*/*repodata* + !builds/*/index.html + + update-channel: + runs-on: head + name: Update Conda Channel + needs: [build-linux, build-other] + steps: + - name: Get linux package + uses: actions/download-artifact@v2 + with: + name: conda-package + path: package + - name: Update channel + run: | + rsync -a package/ ${CONDA_CHANNEL_DIR} + for d in ${CONDA_CHANNEL_DIR}/*; do conda index $d; done; + env: + CONDA_CHANNEL_DIR: /proj/sot/ska/www/ASPECT/ska3-conda/masters From ca8a3af289a539335cac271400c49fe510634e2a Mon Sep 17 00:00:00 2001 From: Aspect CI Date: Tue, 18 Aug 2020 18:50:13 -0400 Subject: [PATCH 3/3] removed file with the wrong name --- .github/workflows/build-arch.yml | 102 ------------------------------- 1 file changed, 102 deletions(-) delete mode 100644 .github/workflows/build-arch.yml diff --git a/.github/workflows/build-arch.yml b/.github/workflows/build-arch.yml deleted file mode 100644 index 3efc5db..0000000 --- a/.github/workflows/build-arch.yml +++ /dev/null @@ -1,102 +0,0 @@ -name: Conda build -on: - push: - branches: - - master - release: - types: - - created - repository_dispatch: - types: - - conda-build - -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/centos7-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/centos7-builder:latest - ${GITHUB_REPOSITORY} --tag ${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 - - name: Save package - uses: actions/upload-artifact@v2 - with: - name: conda-package - path: | - builds/noarch/ - builds/linux-64/ - !builds/*/*repodata* - !builds/*/index.html - - - build-other: - runs-on: ${{ matrix.os }}-latest - name: Build on ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: ["macos", "windows"] - steps: - - name: Fetch Skare3-tools - uses: actions/checkout@v2 - with: - repository: sot/skare3_tools - ref: master - path: skare3_tools - - uses: sot/setup-miniconda@v1 - with: - miniconda-version: "py38_4.8.3" - python-version: "3.8" - channels: https://ska:${{ secrets.CONDA_PASSWORD }}@cxc.cfa.harvard.edu/mta/ASPECT/ska3-conda/shiny - - name: Build Dependencies - shell: bash -l {0} - run: conda install setuptools_scm gitpython conda-build jinja2 pyyaml python=3.8 numpy packaging - - name: Build Package - shell: bash -l {0} - run: | - python skare3_tools/actions/build/files/build.py --arch-specific ${GITHUB_REPOSITORY} --tag ${GITHUB_SHA} - env: - CONDA_PASSWORD: ${{ secrets.CONDA_PASSWORD }} - GIT_USERNAME: chandra-xray - GIT_ASKPASS: ${{ github.workspace }}/skare3_tools/actions/build/files/git_pass.py - GIT_PASSWORD: ${{ secrets.CHANDRA_XRAY_TOKEN }} - - name: Save package - uses: actions/upload-artifact@v2 - with: - name: conda-package - path: | - builds/noarch/ - builds/osx-64/ - builds/win-64/ - !builds/*/*repodata* - !builds/*/index.html - - update-channel: - runs-on: head - name: Update Conda Channel - needs: [build-linux, build-other] - steps: - - name: Get linux package - uses: actions/download-artifact@v2 - with: - name: conda-package - path: package - - name: Update channel - run: | - rsync -a package/ ${CONDA_CHANNEL_DIR} - for d in ${CONDA_CHANNEL_DIR}/*; do conda index $d; done; - env: - CONDA_CHANNEL_DIR: /proj/sot/ska/www/ASPECT/ska3-conda/masters