Add example and update CI to only run on Linux #132
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
name: CI | ||
on: | ||
push: | ||
workflow_dispatch: | ||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ 'ubuntu-latest' ] | ||
java: [ '17', '18', '19', '20', '21' ] | ||
steps: | ||
- name: Setup build | ||
uses: MOEAFramework/.github/actions/setup-build@main | ||
with: | ||
java-version: ${{ matrix.java }} | ||
setup-matlab: true | ||
- name: Setup Radar Waveform code | ||
run: | | ||
cd native/Radar/bin | ||
wget https://perspectival-classi.000webhostapp.com/code/radar_many.zip \ | ||
|| wget https://github.com/MOEAFramework/Archive/raw/main/evanhughes/radar_many.zip | ||
unzip radar_many.zip | ||
cp web_code/testpris.p testpris.p | ||
- name: Build native programs | ||
run: | | ||
make -C native | ||
- name: Build and test with Maven | ||
run: | | ||
mvn package | ||
- name: Test example | ||
run: | | ||
mvn compile exec:java -Dexec.mainClass="org.moeaframework.benchmarks.Example" | ||
- name: Test solve | ||
run: | | ||
mvn compile exec:java -Dexec.mainClass="org.moeaframework.analysis.tools.Solve" \ | ||
-Dexec.args="--algorithm NSGAII --problem LRGV --numberOfEvaluations 10000 --output LRGV_Result.txt" | ||
cat LRGV_Result.txt | ||
- name: Validate README | ||
run: | | ||
mvn compile exec:java -Dexec.mainClass="org.moeaframework.util.cli.UpdateCodeSamples" -Dexec.args="README.md" |