-
Notifications
You must be signed in to change notification settings - Fork 94
121 lines (107 loc) · 3.93 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
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
name: CI
on:
push:
branches: [master, trying, staging]
pull_request:
branches: [master, trying, staging]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
RUST_BACKTRACE: 1
jobs:
gdal:
strategy:
matrix:
version:
- 3.8.1
- 3.7.3
- 3.6.4
- 3.5.3
- 3.4.3
- 3.3.3
- 3.2.3
- 3.1.3 # latest is 3.1.4, but there's no published image
runs-on: ubuntu-latest
container:
image: ghcr.io/osgeo/gdal:ubuntu-full-${{ matrix.version }}
name: "ci gdal-${{ matrix.version }}"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install build deps
shell: bash
run: |
curl -LO https://apache.jfrog.io/artifactory/arrow/ubuntu/apache-arrow-apt-source-latest-$(grep -F VERSION_CODENAME /etc/os-release | cut -d= -f2).deb
apt-get update -y || true
apt-get install gnupg -y
dpkg -i apache-arrow-apt-source-latest-$(grep -F VERSION_CODENAME /etc/os-release | cut -d= -f2).deb
apt-get update -y
apt-get install build-essential curl pkg-config libclang-dev -y
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
- name: Setup building
run: |
export CC="clang-9"
export CXX="clang++-9"
- name: Install stable
run: |
rustup install --no-self-update --profile minimal stable
rustup component add rustfmt clippy
- name: Check with Rustfmt
run: cargo fmt --all --check
- name: Check with Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Check with Clippy (--all-features)
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build
run: cargo build
- name: Run tests
run: cargo test
- name: Build (--all-features)
run: cargo build --all-features
- name: Run tests (--all-features)
run: cargo test --all-features -- --nocapture
ubuntu_lts:
name: "ci ubuntu-lts"
runs-on: "ubuntu-20.04"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install build deps
shell: bash
run: |
sudo apt-get update -y
sudo apt-get install libgdal-dev gdal-bin build-essential curl pkg-config libclang-dev -y
export C_INCLUDE_PATH=/usr/include/gdal:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=/usr/include/gdal:$CPLUS_INCLUDE_PATH
sudo ldconfig
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
- name: Setup building
run: |
export CC="clang-9"
export CXX="clang++-9"
- name: Install stable
run: |
rustup install --no-self-update --profile minimal stable
rustup component add rustfmt clippy
- name: Check with Rustfmt
run: cargo fmt --all --check
- name: Check with Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Check with Clippy (--all-features)
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build
run: cargo build
- name: Run tests
run: cargo test
- name: Build (--all-features)
run: cargo build --all-features
- name: Run tests (--all-features)
run: cargo test --all-features -- --nocapture
- name: Install valgrind and cargo-valgrind
run: |
sudo apt-get install valgrind -y
cargo install cargo-valgrind
- name: Run --lib tests under valgrind
run: cargo valgrind test --lib