From 989b122fe4395774faadb0788641d5b4c852fe65 Mon Sep 17 00:00:00 2001 From: lorenz Date: Sat, 18 Nov 2023 21:06:42 +0100 Subject: [PATCH] refactor GitHub-action file --- .github/workflows/ci.yml | 135 ++++----------------------------------- 1 file changed, 14 insertions(+), 121 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61abefc..97690fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,162 +1,55 @@ -name: Workflow +name: Build Project + on: push: - branches: - - '*' + branches: ['*'] pull_request: - branches: - - '*' + branches: ['*'] release: types: [published] -jobs: - - build_linux: - name: Build (${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: ['ubuntu-latest'] - steps: - - - name: "Clone SMESH" - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - - name: "Fix dependencies" - run: | - sudo apt-get install libxext-dev - sudo ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib64 - - - name: "Configure conda" - uses: conda-incubator/setup-miniconda@v2 - with: - auto-activate-base: true - - - name: "Install conda build" - shell: pwsh - run: conda install -c conda-forge conda-build - - - name: "Check conda" - shell: pwsh - run: | - conda info -a - conda list - - - name: Prepare sources - shell: pwsh - run: | - conda activate - conda install -c conda-forge python-patch - python prepare.py - - - name: "Run conda build" - shell: pwsh - run: | - mkdir conda - conda build ci/conda -c conda-forge --output-folder conda - - - name: "Upload conda package" - uses: actions/upload-artifact@v2 - with: - name: smesh-${{ matrix.os }} - path: conda - build_win: - name: Build (${{ matrix.os }}) +jobs: + build: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: ['windows-latest'] + os: ['ubuntu-latest', 'windows-latest', 'macos-latest'] + steps: - - name: "Clone SMESH" uses: actions/checkout@v2 with: submodules: 'recursive' - - name: "Add conda to PATH" - shell: bash -l {0} - run: echo "$CONDA/Scripts" >> $GITHUB_PATH - - name: "Configure conda" uses: conda-incubator/setup-miniconda@v2 with: auto-activate-base: true - name: "Install conda build" - shell: bash -l {0} run: conda install -c conda-forge conda-build - name: "Check conda" - shell: bash -l {0} run: | conda info -a conda list - - name: Prepare sources - shell: bash -l {0} + - name: "Install Linux Dependencies" + if: matrix.os == 'ubuntu-latest' run: | - conda activate - conda install -c conda-forge python-patch - python prepare.py - - - name: "Run conda build" - shell: bash -l {0} - run: | - mkdir conda - source activate - conda build ci/conda -c conda-forge --output-folder conda - - - name: "Upload conda package" - uses: actions/upload-artifact@v2 - with: - name: smesh-${{ matrix.os }} - path: conda - - build_macos: - name: Build (${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: ['macos-latest'] - steps: - - - name: "Clone SMESH" - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - - name: "Configure conda" - uses: conda-incubator/setup-miniconda@v2 - with: - auto-activate-base: true - - - name: "Install conda build" - shell: pwsh - run: conda install -c conda-forge conda-build - - - name: "Check conda" - shell: pwsh - run: | - conda info -a - conda list + sudo apt-get install -y libxext-dev + sudo ln -s /usr/lib/x86_64-linux-gnu/ /usr/lib64 - - name: Prepare sources - shell: pwsh + - name: "Prepare sources" run: | - conda activate conda install -c conda-forge python-patch python prepare.py - name: "Run conda build" - shell: pwsh run: | mkdir conda - conda build ci/conda -c conda-forge --output-folder conda + conda build ci/conda -c conda-forge --output-folder conda - name: "Upload conda package" uses: actions/upload-artifact@v2