Mac os integration #2818
Workflow file for this run
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
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
- 'release/*' | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version (e.g., if 1.2.3, then binaries look like cctools-1.2.3-ARCH.tar.gz)' | |
required: true | |
tag: | |
description: 'Tag to deploy (e.g. release/7.2.1)' | |
required: true | |
name: Test and deploy | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
container: ${{ format('cclnd/cctools-env:x86_64-{0}', matrix.os-name) }} | |
timeout-minutes: 30 | |
env: | |
CCTOOLS_OUTPUT: ${{ format('cctools-{0}-x86_64-{1}.tar.gz', github.event.inputs.version, matrix.os-name) }} | |
CCTOOLS_DOCKER_GITHUB: ${{ matrix.os-name }} | |
strategy: | |
matrix: | |
os-name: ['centos7', 'almalinux8', 'ubuntu20.04'] | |
needs: lint | |
steps: | |
- name: checkout CCTools from branch head | |
if: github.event_name != 'workflow_dispatch' | |
uses: actions/checkout@v3 | |
- name: checkout CCTools from tag | |
if: github.event_name == 'workflow_dispatch' | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.inputs.tag }} | |
- name: Get sha of tag | |
id: vars | |
shell: bash | |
run: echo "{tag_sha}=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: build | |
run: ${GITHUB_WORKSPACE}/packaging/scripts/build.sh | |
- name: deploy | |
uses: ncipollo/release-action@v1 | |
if: github.event_name == 'workflow_dispatch' | |
with: | |
artifacts: /tmp/${{ env.CCTOOLS_OUTPUT }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
artifactContentType: application/gzip | |
draft: true | |
omitBody: true | |
omitBodyDuringUpdate: true | |
prerelease: true | |
replacesArtifacts: true | |
commit: ${{ steps.vars.output.tag_sha }} | |
tag: ${{ github.event.inputs.tag }} | |
build-os12: | |
runs-on: macos-12 | |
timeout-minutes: 30 | |
env: | |
CCTOOLS_OUTPUT: ${{ format('cctools-{0}-x86_64-{1}.tar.gz', github.event.inputs.version, 'osx-12') }} | |
needs: lint | |
steps: | |
- name: checkout CCTools from branch head | |
if: github.event_name != 'workflow_dispatch' | |
uses: actions/checkout@v3 | |
- name: checkout CCTools from tag | |
if: github.event_name == 'workflow_dispatch' | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.inputs.tag }} | |
- name: Get sha of tag | |
id: vars | |
shell: bash | |
run: echo "{tag_sha}=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Conda-Setup | |
run: | | |
mkdir -p ~/miniconda3 | |
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh | |
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 | |
~/miniconda3/bin/conda init bash | |
source ~/.bashrc | |
conda install -n base conda-libmamba-solver | |
conda create --name cctools-build --yes --quiet --channel conda-forge --strict-channel-priority --solver=libmamba python=3 gdb m4 perl swig make zlib libopenssl-static openssl conda-pack cloudpickle packaging | |
- name: Configure | |
run: | | |
${GITHUB_WORKSPACE}/packaging/build-conda/configure.sh | |
- name: Build | |
run: | | |
${GITHUB_WORKSPACE}/packaging/build-conda/build.sh | |
- name: Install | |
run: | | |
${GITHUB_WORKSPACE}/packaging/build-conda/install.sh | |
- name: Test | |
run: | | |
${GITHUB_WORKSPACE}/packaging/build-conda/test.sh | |
- name: deploy | |
uses: ncipollo/release-action@v1 | |
if: github.event_name == 'workflow_dispatch' | |
with: | |
artifacts: /tmp/${{ env.CCTOOLS_OUTPUT }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
artifactContentType: application/gzip | |
draft: true | |
omitBody: true | |
omitBodyDuringUpdate: true | |
prerelease: true | |
replacesArtifacts: true | |
commit: ${{ steps.vars.output.tag_sha }} | |
tag: ${{ github.event.inputs.tag }} | |
build-os13: | |
runs-on: macos-13 | |
timeout-minutes: 30 | |
env: | |
CCTOOLS_OUTPUT: ${{ format('cctools-{0}-x86_64-{1}.tar.gz', github.event.inputs.version, 'osx-13') }} | |
needs: lint | |
steps: | |
- name: checkout CCTools from branch head | |
if: github.event_name != 'workflow_dispatch' | |
uses: actions/checkout@v3 | |
- name: checkout CCTools from tag | |
if: github.event_name == 'workflow_dispatch' | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.inputs.tag }} | |
- name: Get sha of tag | |
id: vars | |
shell: bash | |
run: echo "{tag_sha}=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Conda-Setup | |
run: | | |
mkdir -p ~/miniconda3 | |
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh | |
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3 | |
~/miniconda3/bin/conda init zsh | |
source ~/.zshrc | |
conda install -n base conda-libmamba-solver | |
conda create --name cctools-build --yes --quiet --channel conda-forge --strict-channel-priority --solver=libmamba python=3 gdb m4 perl swig make zlib libopenssl-static openssl conda-pack cloudpickle packaging | |
- name: Verify Conda Installation | |
run: | | |
source ~/.zshrc | |
conda list --name cctools-build | |
echo $SHELL | |
- name: Configure | |
run: | | |
source ~/.zshrc | |
${GITHUB_WORKSPACE}/packaging/build-conda/configure.sh | |
- name: Build | |
run: | | |
source ~/.zshrc | |
${GITHUB_WORKSPACE}/packaging/build-conda/build.sh | |
- name: Install | |
run: | | |
source ~/.zshrc | |
${GITHUB_WORKSPACE}/packaging/build-conda/install.sh | |
- name: Test | |
run: | | |
source ~/.zshrc | |
chmod 777 ${GITHUB_WORKSPACE}/makeflow/test/TR_makeflow_001_* | |
${GITHUB_WORKSPACE}/packaging/build-conda/test.sh | |
- name: deploy | |
uses: ncipollo/release-action@v1 | |
if: github.event_name == 'workflow_dispatch' | |
with: | |
artifacts: /tmp/${{ env.CCTOOLS_OUTPUT }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
artifactContentType: application/gzip | |
draft: true | |
omitBody: true | |
omitBodyDuringUpdate: true | |
prerelease: true | |
replacesArtifacts: true | |
commit: ${{ steps.vars.output.tag_sha }} | |
tag: ${{ github.event.inputs.tag }} | |
build-conda: | |
needs: lint | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
env: | |
CCTOOLS_OUTPUT: ${{ format('cctools-{0}-x86_64-linux-conda.tar.gz', github.event.inputs.version) }} | |
steps: | |
- name: Checkout CCTools from branch head | |
if: github.event_name != 'workflow_dispatch' | |
uses: actions/checkout@v3 | |
- name: Checkout CCTools from tag | |
if: github.event_name == 'workflow_dispatch' | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.inputs.tag }} | |
- name: Get sha of tag | |
id: vars | |
shell: bash | |
run: echo "{tag_sha}=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Conda-Setup | |
run: ${GITHUB_WORKSPACE}/packaging/build-conda/setup.sh | |
- name: Configure | |
run: ${GITHUB_WORKSPACE}/packaging/build-conda/configure.sh | |
- name: Build | |
run: ${GITHUB_WORKSPACE}/packaging/build-conda/build.sh | |
- name: Install | |
run: ${GITHUB_WORKSPACE}/packaging/build-conda/install.sh | |
- name: Test | |
run: ${GITHUB_WORKSPACE}/packaging/build-conda/test.sh | |
- name: Deploy | |
uses: ncipollo/release-action@v1 | |
if: github.event_name == 'workflow_dispatch' | |
with: | |
artifacts: /tmp/${{ env.CCTOOLS_OUTPUT }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
artifactContentType: application/gzip | |
draft: true | |
omitBody: true | |
omitBodyDuringUpdate: true | |
prerelease: true | |
replacesArtifacts: true | |
commit: ${{ steps.vars.output.tag_sha }} | |
tag: ${{ github.event.inputs.tag }} | |
lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: checkout CCTools from branch head | |
if: github.event_name != 'workflow_dispatch' | |
uses: actions/checkout@v3 | |
- name: checkout CCTools from tag | |
if: github.event_name == 'workflow_dispatch' | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.inputs.tag }} | |
- name: lint code | |
run: ${GITHUB_WORKSPACE}/packaging/lint/lint.sh |