Skip to content

Commit

Permalink
again
Browse files Browse the repository at this point in the history
  • Loading branch information
pariterre committed Aug 12, 2024
1 parent 18d7df0 commit 1c35aff
Showing 1 changed file with 18 additions and 82 deletions.
100 changes: 18 additions & 82 deletions .github/workflows/run_matlab_tests.yml
Original file line number Diff line number Diff line change
@@ -1,102 +1,38 @@
name: Run the Matlab tests
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

on: [pull_request]

env:
BUILD_FOLDER: build
EXAMPLES_FOLDER: examples
name: Upload Release Asset

jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-22.04
label: linux-64
prefix: /usr/share/miniconda3/envs/ezc3d
name: ${{ matrix.label }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Get number of CPU cores
uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores

# - name: Setup environment
# uses: conda-incubator/setup-miniconda@v2
# with:
# miniforge-variant: Mambaforge
# miniforge-version: latest
# use-mamba: true

# - name: Print mamba info
# run: |
# mamba info
# mamba list

# - name: Install dependencies
# run: |
# mamba install cmake git pkgconfig -cconda-forge
# mamba list
# git submodule update --init --recursive

# - name: Install MATLAB
# uses: matlab-actions/setup-matlab@v2

# - name: Build ezc3d
# run: |
# MAIN_FOLDER=`pwd`
# cd
# HOME=`pwd`
# cd $MAIN_FOLDER
# CONDA_ENV_PATH=$CONDA/envs/ezc3d
# mkdir -p $MAIN_FOLDER/$BUILD_FOLDER
# cd $MAIN_FOLDER/$BUILD_FOLDER
# cmake -DCMAKE_INSTALL_PREFIX=$CONDA_ENV_PATH -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=ON -DBUILD_DOC=OFF -DBUILD_EXAMPLE=OFF -DUSE_MATRIX_FAST_ACCESSOR=OFF -DBINDER_MATLAB=ON -DMatlab_ezc3d_INSTALL_DIR=$HOME -DBINDER_PYTHON3=OFF ..
# make install -j${{ steps.cpu-cores.outputs.count }}
# cd $MAIN_FOLDER

# - name: Run the MATLAB binder tests
# run: |
# MAIN_FOLDER=`pwd`
# cd
# HOME=`pwd`
# cd $MAIN_FOLDER/test/matlab
# cp $HOME/ezc3d_matlab/* .
# # We cannot run the tests as we do not have a license. They are however run on octave
# # matlab -batch test_binder_matlab.m
# # matlab -batch test_binder_matlab_force_platform.m
# cd $MAIN_FOLDER

# - name: Build MATLAB archives
# run: |
# zip -r ezc3d_matlab.zip $HOME/ezc3d_matlab
- name: Build MATLAB archives
uses: actions/checkout@v2
- name: Build project # This would actually build your project, using zip for an example artifact
run: |
zip -r ezc3d_matlab.zip README.md
zip --junk-paths my-artifact README.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: TATA
release_name: Release_TATA
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Upload files to a GitHub release
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: steps.create_release.outputs.upload_url
asset_path: ./ezc3d_matlab.zip
asset_name: ezc3d_matlab.zip
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./my-artifact.zip
asset_name: my-artifact.zip
asset_content_type: application/zip

0 comments on commit 1c35aff

Please sign in to comment.