mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-05 23:41:44 +00:00
2b9822f141
Bumps [mamba-org/setup-micromamba](https://github.com/mamba-org/setup-micromamba) from 2 to 3. - [Release notes](https://github.com/mamba-org/setup-micromamba/releases) - [Commits](https://github.com/mamba-org/setup-micromamba/compare/v2...v3) --- updated-dependencies: - dependency-name: mamba-org/setup-micromamba dependency-version: '3' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
114 lines
3.9 KiB
YAML
114 lines
3.9 KiB
YAML
name: ci-ifcopenshell-conda-daily-v0.8.0
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# ┌───────────── minute (0 - 59)
|
|
# │ ┌───────────── hour (0 - 23)
|
|
# │ │ ┌───────────── day of the month (1 - 31)
|
|
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
|
|
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
|
|
# * * * * *
|
|
- cron: "49 23 * * *" # 11min before utc midnight every day
|
|
|
|
jobs:
|
|
activate:
|
|
runs-on: ubuntu-latest
|
|
if: |
|
|
github.repository == 'IfcOpenShell/IfcOpenShell'
|
|
outputs:
|
|
version: ${{ steps.version.outputs.version }}
|
|
date: ${{ steps.date.outputs.date }}
|
|
verdate: ${{ steps.verdate.outputs.verdate }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Set env
|
|
run: echo ok go
|
|
|
|
- name: Get current version
|
|
id: version
|
|
run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
|
|
|
|
- name: Get current date
|
|
id: date
|
|
run: echo "date=$(date +'%y%m%d')" >> $GITHUB_OUTPUT
|
|
|
|
- name: Version + date str
|
|
id: verdate
|
|
run: echo "verdate=${{ steps.version.outputs.version }}alpha${{ steps.date.outputs.date }}" >> $GITHUB_OUTPUT
|
|
|
|
|
|
test:
|
|
name: ${{ matrix.platform.distver }}-${{ matrix.pyver.name }}
|
|
needs: activate
|
|
runs-on: ${{ matrix.platform.distver }}
|
|
defaults:
|
|
run:
|
|
shell: bash -l {0}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
pyver: [
|
|
{ name: py312, distver: '3.12'}
|
|
]
|
|
platform: [
|
|
{ name: win, distver: windows-latest, pkg_dir: 'win-64' },
|
|
{ name: linux, distver: ubuntu-latest, pkg_dir: 'linux-64' },
|
|
{ name: macOS-arm, distver: macos-latest, pkg_dir: 'osx-arm64' }
|
|
]
|
|
steps:
|
|
- name: Set Swap Space
|
|
if: runner.os == 'Linux'
|
|
uses: pierotofy/set-swap-space@master
|
|
with:
|
|
swap-size-gb: 10
|
|
|
|
- name: set ARTIFACTS ENV vars
|
|
shell: bash
|
|
run: |
|
|
pwd
|
|
if [[ "$RUNNER_OS" == "Windows" ]]; then
|
|
echo "ARTIFACTS_DIR=D:/a/artifacts" >> $GITHUB_ENV
|
|
elif [[ "$RUNNER_OS" == "macOS" ]]; then
|
|
echo "ARTIFACTS_DIR=/Users/runner/work/artifacts" >> $GITHUB_ENV
|
|
elif [[ "$RUNNER_OS" == "Linux" ]]; then
|
|
echo "ARTIFACTS_DIR=/home/runner/work/artifacts" >> $GITHUB_ENV
|
|
fi
|
|
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Download and extract MacOSX SDK
|
|
if: ${{ matrix.platform.name == 'macOS-x86' }}
|
|
run: |
|
|
curl -L https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.13.sdk.tar.xz | tar -xvJf - -C /Users/runner/work/
|
|
|
|
- uses: mamba-org/setup-micromamba@v3 # https://github.com/mamba-org/setup-micromamba
|
|
with:
|
|
environment-name: test-env
|
|
create-args: >-
|
|
python=3.12
|
|
anaconda-client
|
|
rattler-build
|
|
|
|
- name: create conda package dist dir
|
|
run: |
|
|
mkdir -p ${{ env.ARTIFACTS_DIR }}
|
|
|
|
- name: build & test ifcopenshell
|
|
run: |
|
|
rattler-build build -r conda/recipe.yaml --output-dir '${{ env.ARTIFACTS_DIR }}'
|
|
env:
|
|
VERSION_OVERRIDE: ${{ needs.activate.outputs.verdate }}
|
|
|
|
- name: upload to anaconda
|
|
if: ${{ matrix.platform.name == 'win' }}
|
|
run: |
|
|
anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload --force --user ifcopenshell '${{ env.ARTIFACTS_DIR }}/${{ matrix.platform.pkg_dir }}/*.conda'
|
|
|
|
- name: upload to anaconda
|
|
if: ${{ matrix.platform.name != 'win' }}
|
|
run: |
|
|
anaconda -t ${{ secrets.ANACONDA_TOKEN }} upload --force --user ifcopenshell ${{ env.ARTIFACTS_DIR }}/${{ matrix.platform.pkg_dir }}/*.conda
|