Skip to content

Commit 43e81c7

Browse files
committed
Init from magbak/maplib
0 parents  commit 43e81c7

File tree

102 files changed

+15604
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+15604
-0
lines changed
+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Release tag on linux
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
RUST_LOG: debug
11+
12+
jobs:
13+
create_release: #From: https://jon.sprig.gs/blog/post/2442
14+
name: Create release
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Create Release
18+
id: create_release
19+
uses: softprops/action-gh-release@v1
20+
with:
21+
name: ${{ github.ref_name }}
22+
draft: false
23+
prerelease: false
24+
generate_release_notes: false
25+
26+
build_release:
27+
name: Build release
28+
runs-on: ubuntu-latest
29+
needs: create_release
30+
strategy:
31+
matrix:
32+
python-version: ['3.9', '3.10', '3.11']
33+
steps:
34+
- uses: actions/checkout@v3
35+
- uses: actions/setup-python@v2
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
39+
- name: Create venv
40+
run: |
41+
python -m venv .venv
42+
source .venv/bin/activate
43+
pip install --upgrade pip
44+
pip install maturin
45+
working-directory: .
46+
47+
- name: Set up nightly rust
48+
run: |
49+
rustup toolchain install nightly-2023-08-01
50+
rustup default nightly-2023-08-01
51+
52+
- name: Build mapper wheels
53+
run: |
54+
source ../.venv/bin/activate
55+
maturin build
56+
working-directory: ./py_maplib
57+
58+
- name: Release
59+
uses: softprops/action-gh-release@v1
60+
with:
61+
tag_name: ${{ needs.create_release.outputs.tag-name }}
62+
files: |
63+
./py_maplib/target/wheels/*.whl
+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Release tag on mac
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
RUST_LOG: debug
11+
12+
jobs:
13+
create_release: #From: https://jon.sprig.gs/blog/post/2442
14+
name: Create release
15+
runs-on: macos-12-xl
16+
steps:
17+
- name: Create Release
18+
id: create_release
19+
uses: softprops/action-gh-release@v1
20+
with:
21+
name: ${{ github.ref_name }}
22+
draft: false
23+
prerelease: false
24+
generate_release_notes: false
25+
26+
build_release:
27+
name: Build release
28+
runs-on: macos-12
29+
needs: create_release
30+
strategy:
31+
matrix:
32+
python-version: ['3.9', '3.10', '3.11']
33+
steps:
34+
- uses: actions/checkout@v3
35+
- uses: actions/setup-python@v2
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
39+
- name: Create venv
40+
run: |
41+
python -m venv .venv
42+
source .venv/bin/activate
43+
pip install --upgrade pip
44+
pip install maturin
45+
working-directory: .
46+
47+
- name: Set up nightly rust
48+
run: |
49+
rustup toolchain install nightly-2023-08-01
50+
rustup default nightly-2023-08-01
51+
52+
- name: Build mapper wheels
53+
run: |
54+
source ../.venv/bin/activate
55+
maturin build
56+
working-directory: ./py_maplib
57+
58+
- name: Release
59+
uses: softprops/action-gh-release@v1
60+
with:
61+
tag_name: ${{ needs.create_release.outputs.tag-name }}
62+
files: |
63+
./py_maplib/target/wheels/*.whl

.github/workflows/python_tests.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Python tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_LOG: debug
12+
13+
jobs:
14+
build_and_test:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m venv .venv
23+
source .venv/bin/activate
24+
pip install --upgrade pip
25+
pip install -r tests/requirements.txt
26+
working-directory: ./py_maplib
27+
28+
- name: Set up nightly rust
29+
run: |
30+
rustup toolchain install nightly-2023-08-01
31+
rustup default nightly-2023-08-01
32+
33+
- name: Build install package
34+
run: |
35+
source .venv/bin/activate
36+
maturin develop
37+
working-directory: ./py_maplib
38+
39+
- name: pytest
40+
run: |
41+
source ../.venv/bin/activate
42+
pytest
43+
working-directory: ./py_maplib/tests
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Release tag on windows
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
RUST_LOG: debug
11+
12+
jobs:
13+
create_release: #From: https://jon.sprig.gs/blog/post/2442
14+
name: Create release
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Create Release
18+
id: create_release
19+
uses: softprops/action-gh-release@v1
20+
with:
21+
name: ${{ github.ref_name }}
22+
draft: false
23+
prerelease: false
24+
generate_release_notes: false
25+
26+
build_release:
27+
name: Build release
28+
runs-on: windows-latest
29+
needs: create_release
30+
strategy:
31+
matrix:
32+
python-version: ['3.9', '3.10', '3.11']
33+
steps:
34+
- uses: actions/checkout@v3
35+
- uses: actions/setup-python@v2
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
39+
- name: Create venv
40+
run: |
41+
python -m venv venv
42+
venv/Scripts/activate
43+
python -m pip install --upgrade pip
44+
python -m pip install maturin
45+
working-directory: .
46+
47+
- name: Set up nightly rust
48+
run: |
49+
rustup self update
50+
rustup set profile minimal
51+
rustup toolchain install nightly-2023-08-01
52+
rustup default nightly-2023-08-01
53+
54+
- name: Build wheels
55+
run: |
56+
../venv/Scripts/activate
57+
maturin build
58+
working-directory: ./py_maplib
59+
60+
- name: Release
61+
uses: softprops/action-gh-release@v1
62+
with:
63+
tag_name: ${{ needs.create_release.outputs.tag-name }}
64+
files: |
65+
./py_maplib/target/wheels/*.whl

.github/workflows/rust_tests.yml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Rust tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUST_LOG: debug
12+
13+
jobs:
14+
build_and_test:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v3
19+
20+
- name: Upgrade rust with nightly and pull oxigraph and dremio image
21+
run: |
22+
rustup update
23+
rustup toolchain install nightly-2023-08-01
24+
rustup default nightly-2023-08-01
25+
26+
docker pull oxigraph/oxigraph:v0.3.2
27+
docker pull dremio/dremio-oss:22.0.0
28+
29+
- uses: actions/cache@v2
30+
with:
31+
path: |
32+
~/.cargo/registry
33+
~/.cargo/git
34+
target
35+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
36+
37+
- name: Build
38+
run: cargo build --verbose --all
39+
- name: Run rust tests
40+
run: cargo test --verbose --all

.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.idea
2+
3+
# Generated by Cargo
4+
# will have compiled files and executables
5+
/target/
6+
7+
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
8+
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
9+
Cargo.lock
10+
11+
# These are backup files generated by rustfmt
12+
**/*.rs.bk

0 commit comments

Comments
 (0)