Skip to content

Commit

Permalink
refactor GitHub-action file
Browse files Browse the repository at this point in the history
  • Loading branch information
looooo authored Nov 18, 2023
1 parent 63ba360 commit 989b122
Showing 1 changed file with 14 additions and 121 deletions.
135 changes: 14 additions & 121 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 989b122

Please sign in to comment.