Skip to content

Commit c5f714d

Browse files
Jonathan BrockettJonathan Brockett
Jonathan Brockett
authored and
Jonathan Brockett
committed
build-conda integration for mac
1 parent a0174c0 commit c5f714d

File tree

6 files changed

+96
-1
lines changed

6 files changed

+96
-1
lines changed

.github/workflows/integration.yml

+61-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
commit: ${{ steps.vars.output.tag_sha }}
6262
tag: ${{ github.event.inputs.tag }}
6363

64-
build-osx:
64+
build-os12:
6565
runs-on: macos-12
6666
timeout-minutes: 30
6767
env:
@@ -98,6 +98,66 @@ jobs:
9898
commit: ${{ steps.vars.output.tag_sha }}
9999
tag: ${{ github.event.inputs.tag }}
100100

101+
build-os13:
102+
runs-on: macos-13
103+
timeout-minutes: 30
104+
env:
105+
CCTOOLS_OUTPUT: ${{ format('cctools-{0}-x86_64-{1}.tar.gz', github.event.inputs.version, 'osx-13') }}
106+
needs: lint
107+
steps:
108+
- name: checkout CCTools from branch head
109+
if: github.event_name != 'workflow_dispatch'
110+
uses: actions/checkout@v3
111+
- name: checkout CCTools from tag
112+
if: github.event_name == 'workflow_dispatch'
113+
uses: actions/checkout@v3
114+
with:
115+
ref: ${{ github.event.inputs.tag }}
116+
- name: Get sha of tag
117+
id: vars
118+
shell: bash
119+
run: echo "{tag_sha}=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
120+
- name: Conda-Setup
121+
run: |
122+
mkdir -p ~/miniconda3
123+
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda3/miniconda.sh
124+
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
125+
~/miniconda3/bin/conda init zsh
126+
source ~/.zshrc
127+
conda install -n base conda-libmamba-solver
128+
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
129+
shell: zsh
130+
- name: Verify Conda Installation
131+
run: conda list --name cctools-build
132+
shell: zsh
133+
- name: Configure
134+
run: ${GITHUB_WORKSPACE}/packaging/build-conda/configure.sh
135+
shell: zsh
136+
- name: Build
137+
run: ${GITHUB_WORKSPACE}/packaging/build-conda/build.sh
138+
shell: zsh
139+
- name: Install
140+
run: ${GITHUB_WORKSPACE}/packaging/build-conda/install.sh
141+
shell: zsh
142+
- name: Test
143+
run: ${GITHUB_WORKSPACE}/packaging/build-conda/test.sh
144+
shell: zsh
145+
- name: deploy
146+
uses: ncipollo/release-action@v1
147+
if: github.event_name == 'workflow_dispatch'
148+
with:
149+
artifacts: /tmp/${{ env.CCTOOLS_OUTPUT }}
150+
token: ${{ secrets.GITHUB_TOKEN }}
151+
allowUpdates: true
152+
artifactContentType: application/gzip
153+
draft: true
154+
omitBody: true
155+
omitBodyDuringUpdate: true
156+
prerelease: true
157+
replacesArtifacts: true
158+
commit: ${{ steps.vars.output.tag_sha }}
159+
tag: ${{ github.event.inputs.tag }}
160+
101161
build-conda:
102162
needs: lint
103163
runs-on: ubuntu-latest

packaging/mac-os/build.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#! /bin/bash
2+
3+
conda run --name cctools-build make

packaging/mac-os/configure.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
# Leave out some items that are research prototypes.
4+
DISABLED_SYS=$(echo --without-system-{parrot,prune,umbrella,weaver})
5+
DISABLED_LIB=$(echo --with-{readline,fuse,perl}-path\ no)
6+
7+
# Now configure in the normal way.
8+
conda run --name cctools-build ./configure --strict ${DISABLED_SYS} ${DISABLED_LIB} "$@"
9+
[[ -f config.mk ]] && make clean
10+
echo === Contents of config.mk ===
11+
cat config.mk

packaging/mac-os/install.sh

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#! /bin/bash
2+
3+
conda run --name cctools-build make install

packaging/mac-os/setup.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#! /bin/bash
2+
mkdir -p ~/miniconda3
3+
curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-arm64.sh -o ~/miniconda3/miniconda.sh
4+
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
5+
~/miniconda3/bin/conda init zsh
6+
7+
conda create --name cctools-build --yes --quiet --channel conda-forge --strict-channel-priority --experimental-solver=libmamba python=3 gdb m4 perl swig make zlib libopenssl-static openssl conda-pack cloudpickle packaging

packaging/mac-os/test.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
if ! conda run --name cctools-build make test
4+
then
5+
echo === Contents of cctools.test.fail ===
6+
cat cctools.test.fail
7+
exit 1
8+
else
9+
exit 0
10+
fi
11+

0 commit comments

Comments
 (0)