Skip to content

add distributed

add distributed #117

Workflow file for this run

name: Create Binaries
on:
push:
branches:
- "main"
- "release/**"
- "pre-releases/**"
- "!release/v1"
pull_request:
branches:
- "main"
- "release/**"
- "!release/v1"
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-22.04, macos-13, ubuntu-20.04]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.6-0'
micromamba-binary-path: ${{ runner.temp }}/bin/micromamba
environment-file: conda_environment_binary.yaml
environment-name: copernicusmarine-binary
condarc-file: .condarc
cache-environment: true
post-cleanup: 'all'
- name: Build with PyInstaller
shell: micromamba-shell {0}
run: |
make run-using-pyinstaller-${{ matrix.os }}
- name: Set VERSION environment variable
id: set-version
shell: micromamba-shell {0}
run: echo "VERSION=$(poetry version --short)" >> $GITHUB_OUTPUT
- name: Upload binaries to macos or ubuntu
shell: micromamba-shell {0}
env:
GH_TOKEN: ${{ github.token }}
run: |
if [ "${{ matrix.os }}" == "macos-latest" ]; then
ARCH="macos-arm64"
elif [ "${{ matrix.os }}" == "macos-13" ]; then
ARCH="macos-x86_64"
elif [ "${{ matrix.os }}" == "ubuntu-22.04" ]; then
ARCH="linux-glibc-2.35"
elif [ "${{ matrix.os }}" == "ubuntu-20.04" ]; then
ARCH="linux-glibc-2.31"
fi
gh release upload v${{steps.set-version.outputs.VERSION}} dist/copernicusmarine_${ARCH}.cli#copernicusmarine-binary-${ARCH}-for-v${{steps.set-version.outputs.VERSION}}