moved to job summary #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with MATLAB Actions | |
name: SDMX Build and test | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build-java: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 8 for x64 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
architecture: x64 | |
- name: Run the Ant jar target | |
run: cd JAVA && ant clean && ant compile && ant dist | |
- name: Archive MATLAB JAR for next job | |
uses: actions/upload-artifact@v3 | |
with: | |
name: SDMX | |
path: MATLAB/lib/SDMX.jar | |
if-no-files-found: error | |
retention-days: 1 | |
build-test-matlab: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
needs: build-java | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v3 | |
- name: Download a single artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: SDMX | |
path: MATLAB/tbx/lib | |
# Sets up MATLAB on the GitHub Actions runner | |
- name: Setup MATLAB | |
uses: matlab-actions/setup-matlab@v1 | |
with: | |
release: R2023a | |
# Run buildtool to test and package MATLAB. | |
- name: Run buildtool | |
uses: matlab-actions/run-command@v1 | |
with: | |
command: openProject('MATLAB/SDMX.prj'), buildtool | |
- name: Archive MATLAB Toolbox | |
uses: actions/upload-artifact@v3 | |
with: | |
name: MatSDMX | |
path: | | |
MATLAB/releases/SDMX.mltbx | |
if-no-files-found: error | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@v2 | |
with: | |
# upload entire directory | |
path: MATLAB/tests/reports | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v2 | |
- name: Create Annotation with links | |
run: | | |
echo ':notice:<a href="https://ebenetce.github.io/SDMX/results/" target="_blank">Test results report</a>' >> $GITHUB_STEP_SUMMARY | |
echo ':notice:<a href="https://ebenetce.github.io/SDMX/coverageReport/" target="_blank">Code coverage report</a>' >> $GITHUB_STEP_SUMMARY | |