-
Notifications
You must be signed in to change notification settings - Fork 0
122 lines (102 loc) · 3.08 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Build Jobs
on:
push:
pull_request:
branches:
- main
# Build all of the projects and run them against the CASE graph
jobs:
dotnet:
runs-on: ubuntu-latest
strategy:
matrix:
# Test oldest and most current supported versions, per:
# https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core
dotnet-version:
- '6.x'
- '8.x'
steps:
# Get the code from the repository
- name: Get Repo
uses: actions/checkout@v4
# Install the .NET SDK
- name: Setup .NET
uses: actions/[email protected]
with:
dotnet-version: ${{ matrix.dotnet-version }}
# Build the project
- name: Build
run: dotnet build
working-directory: ./dotnet/
# Run the built CASE conversion example
- name: Run CASE Conversion
run: |
dotnet run ../data/geo.json ../output/dotnet.geojson
cat ../output/dotnet.geojson
working-directory: ./dotnet/
python:
runs-on: ubuntu-latest
strategy:
matrix:
# Test oldest and most current supported versions, per:
# https://www.python.org/downloads/
# and:
# https://github.com/casework/CASE-Utilities-Python/blob/main/setup.cfg
python-version:
- '3.9'
- '3.12'
steps:
# Get the code from the repository
- name: Get Repo
uses: actions/checkout@v4
# Install Python
- name: Setup Python
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
# Install the rdflib dependency
- name: Install Dependencies
run: pip3 install rdflib
# Run the Python CASE conversion example
- name: Run CASE Conversion
run: |
python3 CASE2GeoJSON.py ../data/geo.json ../output/python.geojson
cat ../output/python.geojson
working-directory: ./python/
java:
runs-on: ubuntu-latest
steps:
# Get the code from the repository
- name: Get Repo
uses: actions/checkout@v4
# Install Java
- name: Setup Java
uses: actions/[email protected]
with:
distribution: 'temurin'
java-version: '18'
cache: 'maven'
# Build the project
- name: Build Project
run: mvn compile assembly:single
working-directory: ./java/case2geo/
# Run the Java CASE conversion example
- name: Run CASE Conversion
run: |
java -jar ./target/case2geo-0.1.0.jar ../../data/geo.json ../../output/java.geojson
cat ../../output/java.geojson
working-directory: ./java/case2geo/
geojson-validation:
runs-on: ubuntu-latest
needs: [dotnet, java, python]
steps:
# Get the code from the repository
- name: Get Repo
uses: actions/checkout@v4
# Install Python
- name: Setup Python
uses: actions/[email protected]
with:
python-version: '3.12'
- name: Validate
run: make --keep-going check