-
Notifications
You must be signed in to change notification settings - Fork 0
158 lines (130 loc) · 4.15 KB
/
Copy pathbuild.yml
File metadata and controls
158 lines (130 loc) · 4.15 KB
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
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:
- '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/setup-dotnet@v4.0.1
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.10'
- '3.14'
steps:
# Get the code from the repository
- name: Get Repo
uses: actions/checkout@v4
# Install Python
- name: Setup Python
uses: actions/setup-python@v5.1.1
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/setup-java@v4.2.2
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/
rust:
runs-on: ubuntu-latest
steps:
# Get the code from the repository
- name: Get Repo
uses: actions/checkout@v4
# Cargo installation logistics c/o:
# https://github.com/oxigraph/oxigraph/blob/v0.4.9/.github/actions/setup-rust/action.yml#L21
# Install Cargo
- name: Setup Rust
run: which cargo || sudo DEBIAN_FRONTEND=noninteractive apt-get -y install cargo
# Steps below can all be run in a local development environment by
# running `make` in ./rust/case2geojson.
# Test the project
- name: Test Project
run: |
cargo check
cargo test
working-directory: ./rust/case2geojson/
# Build the project
- name: Build Project
run: cargo build
working-directory: ./rust/case2geojson/
# Run the Rust CASE conversion example
- name: Run CASE Conversion
run: |
target/debug/case2geojson ../../data/geo.json ../../output/rust.geojson
cat ../../output/rust.geojson
working-directory: ./rust/case2geojson/
geojson-validation:
runs-on: ubuntu-latest
needs: [dotnet, java, python, rust]
steps:
# Get the code from the repository
- name: Get Repo
uses: actions/checkout@v4
# Install Python
- name: Setup Python
uses: actions/setup-python@v5.1.1
with:
python-version: '3.13'
- name: Validate
run: make --keep-going check