mirror of
https://github.com/cosinekitty/astronomy.git
synced 2026-05-18 22:01:42 -04:00
Use conditions & matrix for workflow
This commit is contained in:
94
.github/workflows/astronomy-engine-tests.yml
vendored
94
.github/workflows/astronomy-engine-tests.yml
vendored
@@ -1,71 +1,15 @@
|
||||
name: Astronomy Engine Unit Tests
|
||||
on: [push]
|
||||
jobs:
|
||||
Astronomy-Engine-Linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Init dotnet core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
- name: Init Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install Python linter
|
||||
run: python -m pip install --upgrade pip && pip install pylint
|
||||
- name: Install documentation tools
|
||||
run: sudo apt install -y doxygen xsltproc
|
||||
- name: Init Node.js 14.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
- name: set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Install Kotlin Native compiler
|
||||
run: generate/install_kotlin_native 'https://github.com/JetBrains/kotlin/releases/download/v1.6.20/kotlin-native-linux-x86_64-1.6.20.tar.gz'
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
- name: Test Astronomy Engine
|
||||
run: cd generate && rm -f output/vsop*.txt output/*.eph output/jupiter_moons.txt && ./run && ./verify_clean
|
||||
|
||||
Astronomy-Engine-Macos:
|
||||
runs-on: macos-11
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Init dotnet core
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
- name: Init Python 3.7
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install Python linter
|
||||
run: python -m pip install --upgrade pip && pip install pylint
|
||||
- name: Install documentation tools
|
||||
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install doxygen
|
||||
- name: Init Node.js 14.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 14.x
|
||||
- name: set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Install Kotlin Native compiler
|
||||
run: generate/install_kotlin_native 'https://github.com/JetBrains/kotlin/releases/download/v1.6.20/kotlin-native-macos-x86_64-1.6.20.tar.gz'
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
- name: Test Astronomy Engine
|
||||
run: cd generate && rm -f output/vsop*.txt output/*.eph output/jupiter_moons.txt && ./run && ./verify_clean
|
||||
|
||||
Astronomy-Engine-Windows:
|
||||
runs-on: windows-latest
|
||||
Astronomy-Engine:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-latest, macos-11, windows-latest ]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Add msbuild to path
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
uses: microsoft/setup-msbuild@v1.1
|
||||
- name: Init dotnet core
|
||||
uses: actions/setup-dotnet@v1
|
||||
@@ -75,6 +19,14 @@ jobs:
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install Python linter
|
||||
run: python -m pip install --upgrade pip && pip install pylint
|
||||
- name: Install documentation tools Linux
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
run: sudo apt install -y doxygen xsltproc
|
||||
- name: Install documentation tools macOs
|
||||
if: startsWith(matrix.os, 'macOS')
|
||||
run: HOMEBREW_NO_AUTO_UPDATE=1 brew install doxygen
|
||||
- name: Init Node.js 14.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
@@ -83,7 +35,23 @@ jobs:
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Install Kotlin Native compiler Linux
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
run: generate/install_kotlin_native 'https://github.com/JetBrains/kotlin/releases/download/v1.6.20/kotlin-native-linux-x86_64-1.6.20.tar.gz'
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
- name: Test Astronomy Engine
|
||||
- name: Test Astronomy Engine Linux
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
run: cd generate && rm -f output/vsop*.txt output/*.eph output/jupiter_moons.txt && ./run && ./verify_clean
|
||||
|
||||
- name: Install Kotlin Native compiler macOs
|
||||
if: startsWith(matrix.os, 'macOS')
|
||||
run: generate/install_kotlin_native 'https://github.com/JetBrains/kotlin/releases/download/v1.6.20/kotlin-native-macos-x86_64-1.6.20.tar.gz'
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
- name: Test Astronomy Engine macOs
|
||||
if: startsWith(matrix.os, 'macOS')
|
||||
run: cd generate && rm -f output/vsop*.txt output/*.eph output/jupiter_moons.txt && ./run && ./verify_clean
|
||||
|
||||
- name: Test Astronomy Engine Windows
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
shell: cmd
|
||||
run: call generate\commit_hook.bat
|
||||
|
||||
Reference in New Issue
Block a user