-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (53 loc) · 1.67 KB
/
ci.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
name: GitHub CI/CD Workflow
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
container:
image: ubuntu:24.04
env:
OPENSSL_DIR: /usr/include/openssl
OPENSSL_LIB_DIR: /usr/lib/x86_64-linux-gnu
OPENSSL_INCLUDE_DIR: /usr/include/openssl
steps:
- name: Install dependencies
run: |
apt-get update
apt-get install -y curl git build-essential libssl-dev
- uses: actions/checkout@v4 # checkout the repository
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Set up JDK 11 # required for build-models.sh
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: '^1.22'
- name: Install Funnel
run: |
if [ -d "funnel" ]; then rm -Rf funnel; fi
git clone https://github.com/ohsu-comp-bio/funnel.git
cd funnel && make && make install && cd ..
- uses: actions/checkout@v4 # checkout the repository
- name: Build models
run: |
bash ./build-models.sh
- name: Build
run: |
cargo build --verbose
- name: Run tests
run: |
bash ./run-tests.sh
- name: Lint
run: |
cargo clippy -- -D warnings
- name: Format
run: |
cargo fmt -- ./lib/src/serviceinfo/models/*.rs # workaround to fix autogenerated code formatting
cargo fmt -- ./lib/src/tes/models/*.rs
cargo fmt -- --check