Skip to content

Commit

Permalink
testing reusable workflow (cont'd)
Browse files Browse the repository at this point in the history
  • Loading branch information
olivier-roussel committed Jan 9, 2025
1 parent e775666 commit 6210ed7
Show file tree
Hide file tree
Showing 18 changed files with 194 additions and 88 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_publish_linux-64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: linux-64
name: deprecated_linux-64

on: workflow_dispatch

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_publish_osx-64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: osx-64
name: deprecated_osx-64

on: workflow_dispatch

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_publish_osx-arm64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: osx-arm64
name: deprecated_osx-arm64

on: workflow_dispatch

Expand Down
26 changes: 19 additions & 7 deletions .github/workflows/build_publish_package.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: sofa-package
name: common-build-publish-sofa-package

on:
workflow_call:
inputs:
package-name:
required: true
type: string
os:
runner:
required: true
type: string
platform:
Expand All @@ -24,15 +24,26 @@ on:

jobs:
build-publish-sofa:
name: "Build and publish ${{ inputs.package-name }} - ${{ inputs.platform }} conda packages for ${{ inputs.os }}"
runs-on: ${{ inputs.os }}

name: "Build and publish ${{ inputs.package-name }} - ${{ inputs.platform }} (py${{ inputs.python }} ) conda packages on ${{ inputs.runner }}"
runs-on: ${{ inputs.runner }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: conda-incubator/setup-miniconda@v3
# We force to use a conda env located close to filesystem root on Windows to bypass a compilation bug with SOFA
# due to too long filename, even if LongPath registry key is enabled
- name: Install miniconda [Windows]
if: contains(inputs.runner, 'windows')
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: c:\so
auto-update-conda: true
miniforge-version: latest

- name: Install miniconda [Linux & macOS]
if: contains(inputs.runner, 'windows') == false
uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: sofa-conda-ci
auto-update-conda: true
Expand All @@ -56,10 +67,11 @@ jobs:
- name: Build & publish sofa conda package
shell: bash -l {0}
run: |
conda info
cd conda/recipes
PKG_DIR=../../../rattler-bld
if [ ! -z "${{ inputs.python }}" ]; then
rattler-build build --recipe ${{ inputs.package-name }}/recipe.yaml --variant-config ../configs/${{ inputs.platform }}.yaml --variant-config ../configs/${{ inputs.python }}.yaml --output-dir $PKG_DIR --experimental -c conda-forge -c ${{ inputs.anaconda-channel }}
rattler-build build --recipe ${{ inputs.package-name }}/recipe.yaml --variant-config ../configs/${{ inputs.platform }}.yaml --variant-config ../configs/python-${{ inputs.python }}.yaml --output-dir $PKG_DIR --experimental -c conda-forge -c ${{ inputs.anaconda-channel }}
else
rattler-build build --recipe ${{ inputs.package-name }}/recipe.yaml --variant-config ../configs/${{ inputs.platform }}.yaml --output-dir $PKG_DIR --experimental -c conda-forge -c ${{ inputs.anaconda-channel }}
fi
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/build_publish_sofa.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/build_publish_win-64.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: win-64
name: deprecated_win-64

on: workflow_dispatch

Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/sofa-beamadapter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: sofa-beamadapter
on:
- workflow_call
- workflow_dispatch

jobs:
build-publish-sofa-beamadapter:
strategy:
fail-fast: false
matrix:
target: [{platform: "linux-64", runner: "ubuntu-latest"},
{platform: "osx-64", runner: "macos-13"},
{platform: "osx-arm64", runner: "macos-14"},
{platform: "win-64", runner: "windows-latest"}]

uses: ./.github/workflows/build_publish_package.yml
with:
package-name: sofa-beamadapter
runner: ${{ matrix.target.runner }}
platform: ${{ matrix.target.platform }}
anaconda-channel: sofa-framework-prerelease
secrets:
anaconda-token: ${{ secrets.ANACONDA_PRERELEASE_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/sofa-cosserat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: sofa-cosserat
on:
- workflow_call
- workflow_dispatch

jobs:
build-publish-sofa-cosserat:
strategy:
fail-fast: false
matrix:
target: [{platform: "linux-64", runner: "ubuntu-latest"},
{platform: "osx-64", runner: "macos-13"},
{platform: "osx-arm64", runner: "macos-14"},
{platform: "win-64", runner: "windows-latest"}]
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

uses: ./.github/workflows/build_publish_package.yml
with:
package-name: sofa-cosserat
runner: ${{ matrix.target.runner }}
platform: ${{ matrix.target.platform }}
python: ${{ matrix.target.python }}
anaconda-channel: sofa-framework-prerelease
secrets:
anaconda-token: ${{ secrets.ANACONDA_PRERELEASE_TOKEN }}
13 changes: 0 additions & 13 deletions .github/workflows/sofa-linux-64.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/sofa-modelorderreduction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: sofa-modelorderreduction
on:
- workflow_call
- workflow_dispatch

jobs:
build-publish-sofa-modelorderreduction:
strategy:
fail-fast: false
matrix:
target: [{platform: "linux-64", runner: "ubuntu-latest"},
{platform: "osx-64", runner: "macos-13"},
{platform: "osx-arm64", runner: "macos-14"},
{platform: "win-64", runner: "windows-latest"}]
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

uses: ./.github/workflows/build_publish_package.yml
with:
package-name: sofa-modelorderreduction
runner: ${{ matrix.target.runner }}
platform: ${{ matrix.target.platform }}
python: ${{ matrix.target.python }}
anaconda-channel: sofa-framework-prerelease
secrets:
anaconda-token: ${{ secrets.ANACONDA_PRERELEASE_TOKEN }}
14 changes: 0 additions & 14 deletions .github/workflows/sofa-python3-py38-linux-64.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/sofa-python3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: sofa-python3
on:
- workflow_call
- workflow_dispatch

jobs:
build-publish-sofa-python3:
strategy:
fail-fast: false
matrix:
target: [{platform: "linux-64", runner: "ubuntu-latest"},
{platform: "osx-64", runner: "macos-13"},
{platform: "osx-arm64", runner: "macos-14"},
{platform: "win-64", runner: "windows-latest"}]
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

uses: ./.github/workflows/build_publish_package.yml
with:
package-name: sofa-python3
runner: ${{ matrix.target.runner }}
platform: ${{ matrix.target.platform }}
python: ${{ matrix.target.python }}
anaconda-channel: sofa-framework-prerelease
secrets:
anaconda-token: ${{ secrets.ANACONDA_PRERELEASE_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/sofa-softrobots.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: sofa-softrobots
on:
- workflow_call
- workflow_dispatch

jobs:
build-publish-sofa-softrobots:
strategy:
fail-fast: false
matrix:
target: [{platform: "linux-64", runner: "ubuntu-latest"},
{platform: "osx-64", runner: "macos-13"},
{platform: "osx-arm64", runner: "macos-14"},
{platform: "win-64", runner: "windows-latest"}]
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

uses: ./.github/workflows/build_publish_package.yml
with:
package-name: sofa-softrobots
runner: ${{ matrix.target.runner }}
platform: ${{ matrix.target.platform }}
python: ${{ matrix.target.python }}
anaconda-channel: sofa-framework-prerelease
secrets:
anaconda-token: ${{ secrets.ANACONDA_PRERELEASE_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/sofa-stlib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: sofa-stlib
on:
- workflow_call
- workflow_dispatch

jobs:
build-publish-sofa-stlib:
strategy:
fail-fast: false
matrix:
target: [{platform: "linux-64", runner: "ubuntu-latest"},
{platform: "osx-64", runner: "macos-13"},
{platform: "osx-arm64", runner: "macos-14"},
{platform: "win-64", runner: "windows-latest"}]
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

uses: ./.github/workflows/build_publish_package.yml
with:
package-name: sofa-stlib
runner: ${{ matrix.target.runner }}
platform: ${{ matrix.target.platform }}
python: ${{ matrix.target.python }}
anaconda-channel: sofa-framework-prerelease
secrets:
anaconda-token: ${{ secrets.ANACONDA_PRERELEASE_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/sofa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: sofa
on:
- workflow_call
- workflow_dispatch

jobs:
build-publish-sofa:
strategy:
fail-fast: false
matrix:
target: [{platform: "linux-64", runner: "ubuntu-latest"},
{platform: "osx-64", runner: "macos-13"},
{platform: "osx-arm64", runner: "macos-14"},
{platform: "win-64", runner: "windows-latest"}]

uses: ./.github/workflows/build_publish_package.yml
with:
package-name: sofa
runner: ${{ matrix.target.runner }}
platform: ${{ matrix.target.platform }}
anaconda-channel: sofa-framework-prerelease
secrets:
anaconda-token: ${{ secrets.ANACONDA_PRERELEASE_TOKEN }}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6210ed7

Please sign in to comment.