Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @jorisbelierasml @watermarkhu
47 changes: 24 additions & 23 deletions .github/workflows/release-matfrostmex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build-mex-binary:
strategy:
matrix:
matlab-version: ['2021b', '2022a', '2022b', '2023a', '2023b', '2024a']
matlab-version: ['2021b', '2022a', '2022b', '2023a', '2023b', '2024a', '2024b', '2025a']
runs-on: windows-latest
name: windows-R${{ matrix.matlab-version }}
steps:
Expand All @@ -34,26 +34,27 @@ jobs:
with:
path: src/matfrostjuliacall/bin
name: matfrost-mex-win-r${{ matrix.matlab-version }}-x64
release-mex-binary:
needs: build-mex-binary
runs-on: ubuntu-latest
name: Release-MEX-Binary
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download MEX artifacts
uses: actions/download-artifact@v4
with:
path: mexbinwin
merge-multiple: true
- name: Display structure of downloade MEX binaries.
run: ls -R mexbinwin
- name: Upload MEX binaries
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd mexbinwin
tar -czvf ../matfrost-mex-v${{ inputs.matfrost-mex-version }}-win-x64.tar.gz *
cd ..
gh release create matfrost-mex-v${{ inputs.matfrost-mex-version }} --latest=false matfrost-mex-v${{ inputs.matfrost-mex-version }}-win-x64.tar.gz

# release-mex-binary:
# needs: build-mex-binary
# runs-on: ubuntu-latest
# name: Release-MEX-Binary
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Download MEX artifacts
# uses: actions/download-artifact@v4
# with:
# path: mexbinwin
# merge-multiple: true
# - name: Display structure of downloade MEX binaries.
# run: ls -R mexbinwin
# - name: Upload MEX binaries
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# cd mexbinwin
# tar -czvf ../matfrost-mex-v${{ inputs.matfrost-mex-version }}-win-x64.tar.gz *
# cd ..
# gh release create matfrost-mex-v${{ inputs.matfrost-mex-version }} --latest=false matfrost-mex-v${{ inputs.matfrost-mex-version }}-win-x64.tar.gz

3 changes: 3 additions & 0 deletions .github/workflows/run-tests-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
- 'R2023a'
- 'R2023b'
- 'R2024a'
- 'R2024b'
- 'R2025a'
julia-version:
required: true
description: "Julia version"
Expand All @@ -31,6 +33,7 @@ on:
- '1.8'
- '1.9'
- '1.10'
- '1.11'

jobs:
test:
Expand Down
52 changes: 40 additions & 12 deletions .github/workflows/run-tests-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,54 @@ on:
default: "1.10"
type: string

jobs:
config:
runs-on: ubuntu-latest
steps:
- name: Parse MATLAB version
id: parse_matlab_version
run: |
VERSION="${{ inputs.matlab-version }}"
YEAR=$(echo "$VERSION" | grep -oP 'R\K[0-9]{4}')
RELEASE=$(echo "$VERSION" | grep -oP '[ab]$')
echo "MATLAB_YEAR=$YEAR" >> $GITHUB_ENV
echo "MATLAB_RELEASE=$RELEASE" >> $GITHUB_ENV

env:
GCC_VERSION: ${{ (startsWith(inputs.matlab-version, 'R2022') && '9' || '10') }}
- name: Set GCC version
id: set_gcc_version
run: |
if [[ "${{ env.MATLAB_YEAR }}" -lt 2021 ]]; then
echo "gcc_version=9" >> $GITHUB_OUTPUT
else
echo "gcc_version=10" >> $GITHUB_OUTPUT
fi

- name: Set Windows GCC products
id: set_windows_products
run: |
if [[ "${{ env.MATLAB_YEAR }}" -ge 2024 ]]; then
echo "windows_products=MATLAB_Support_for_MinGW-w64_C/C++/Fortran_Compiler" >> $GITHUB_OUTPUT
else
echo "windows_products=MATLAB_Support_for_MinGW-w64_C/C++_Compiler" >> $GITHUB_OUTPUT
fi

outputs:
gcc_version: ${{ steps.set_gcc_version.outputs.gcc_version }}
windows_products: ${{ steps.set_windows_products.outputs.windows_products }}

jobs:
test:
needs: [config]
runs-on: ${{ inputs.os }}
name: ${{ inputs.os }}-${{ inputs.matlab-version }}-${{ inputs.julia-version }}
steps:

- name: Configure compatible linux GCC compiler for MATLAB.
if: ${{ startsWith(inputs.os , 'ubuntu') }}
run: |
sudo apt-get install g++-${{ env.GCC_VERSION }}
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ env.GCC_VERSION }} 100
sudo apt-get install g++-${{ needs.config.outputs.gcc_version }}
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ needs.config.outputs.gcc_version }} 100
sudo update-alternatives --config g++
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_VERSION }} 100
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ needs.config.outputs.gcc_version }} 100
sudo update-alternatives --config gcc
g++ --version
gcc --version
Expand All @@ -47,9 +78,9 @@ jobs:
with:
channel: ${{ inputs.julia-version }}

- name: Set up MATLAB on Unix/Mac
- name: Set up MATLAB on Unix
uses: matlab-actions/setup-matlab@v2
if: ${{ !contains( inputs.os, 'windows') }}
if: ${{ startsWith(inputs.os , 'ubuntu') }}
with:
release: ${{ inputs.matlab-version }}
cache: true
Expand All @@ -60,11 +91,8 @@ jobs:
with:
release: ${{ inputs.matlab-version }}
cache: true
products: >
${{ contains(inputs.matlab-version, '2024') && 'MATLAB_Support_for_MinGW-w64_C/C++/Fortran_Compiler' || 'MATLAB_Support_for_MinGW-w64_C/C++_Compiler' }}
products: ${{ needs.config.outputs.windows_products }}



- name: Run tests
uses: matlab-actions/run-tests@v2
env:
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/run-tests-ubuntu.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/run-tests-windows.yml

This file was deleted.

90 changes: 63 additions & 27 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,6 @@
name: Run Tests Automation
name: Testing

on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'src/**'
- 'test/**'
- 'Project.toml'
- '.github/workflows/run-tests.yml'
- '.github/workflows/run-tests-reusable.yml'
pull_request:
branches:
- main
Expand All @@ -19,21 +9,67 @@ on:
- reopened
- synchronize
- ready_for_review
paths:
- 'src/**'
- 'test/**'
- 'Project.toml'
- '.github/workflows/run-tests.yml'
- '.github/workflows/run-tests-reusable.yml'

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}-${{ github.event.pull_request.merged }}"
cancel-in-progress: true

jobs:
# Linux disabled due to incompatability.
#
# ubuntu:
# uses: ./.github/workflows/run-tests-ubuntu.yml
# if: ${{ ((github.event_name == 'pull_request') && !github.event.pull_request.draft) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch') }}
# secrets: inherit
windows:
uses: ./.github/workflows/run-tests-windows.yml
if: ${{ ((github.event_name == 'pull_request') && !github.event.pull_request.draft) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch') }}
secrets: inherit
changed-files:
name: Check for changed files
runs-on: ubuntu-latest
outputs:
changed-workflows: ${{ steps.changed-files.outputs.workflows_any_changed }}
changed-src: ${{ steps.changed-files.outputs.src_any_changed }}
changed-test: ${{ steps.changed-files.outputs.test_any_changed }}
changed-examples: ${{ steps.changed-files.outputs.examples_any_changed }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v46
with:
files_yaml: |
workflows:
- .github/workflows/run-tests*.yaml
src:
- src/**
- Project.toml
- Artifacts.toml
test:
- test/**
examples:
- examples/**

test-matrix:
needs: [changed-files]
if: ${{ needs.changed-files.outputs.changed-workflows || needs.changed-files.outputs.changed-src || needs.changed-files.outputs.changed-test || needs.changed-files.outputs.changed-examples }}
strategy:
fail-fast: false
matrix:
os: [windows-latest]
julia-version: ['1.7', '1.8', '1.9', '1.10', '1.11']
matlab-version: ['R2021b', 'R2022a', 'R2022b', 'R2023a', 'R2023b', 'R2024a', 'R2024b', 'R2025a']
uses: ./.github/workflows/run-tests-reusable.yml
with:
os: ${{ matrix.os }}
julia-version: ${{ matrix.julia-version }}
matlab-version: ${{ matrix.matlab-version }}

summary:
name: Summary
needs: [changed-files, test-matrix]
if: ${{ !cancelled() }}
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4

- name: Generate JUnit summary
if: ${{ needs.changed-files.outputs.changed-workflows || needs.changed-files.outputs.changed-src || needs.changed-files.outputs.changed-test || needs.changed-files.outputs.changed-examples }}
uses: mikepenz/action-junit-report@v5
with:
report_paths: results-*/results.xml
fail_on_error: true
6 changes: 3 additions & 3 deletions Artifacts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
git-tree-sha1 = "3c64e8d2a2e9720abcb9edfdfae4bae4882d0d40"


[[matfrost-mex.download]]
sha256 = "26cea9dca7b408b84a9a66e0974aa121253d8c4314687d97bf5c9989e16479e1"
url = "https://github.com/ASML-Labs/MATFrost.jl/releases/download/matfrost-mex-v0.4.0/matfrost-mex-v0.4.0-win-x64.tar.gz"
[[matfrost-mex.download]]
sha256 = "26cea9dca7b408b84a9a66e0974aa121253d8c4314687d97bf5c9989e16479e1"
url = "https://github.com/ASML-Labs/MATFrost.jl/releases/download/matfrost-mex-v0.4.0/matfrost-mex-v0.4.0-win-x64.tar.gz"