Skip to content

Commit

Permalink
Remove libolm usage & switch to poetry (#65)
Browse files Browse the repository at this point in the history
This PR does a couple of things. 
- convert to using poetry to make rust integration easier
- switch over to using vodozemac for crypto
- switch over to matrix-sdk-crypto to remove mautrix dependency (which
was pulling in libolm)

After this, libolm is no longer used and it has been removed from the CI
workflow to be sure.
All functionality remains compatible with previous version of the
matrix-content-scanner.
  • Loading branch information
devonh authored Sep 19, 2024
1 parent 5f99639 commit dd35a49
Show file tree
Hide file tree
Showing 27 changed files with 3,820 additions and 261 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
!README.md
!pyproject.toml
!setup.cfg
!poetry.lock
!Cargo.toml
!Cargo.lock
!build_rust.py
!rust

**/__pycache__
27 changes: 16 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,28 @@ jobs:
name: Check code style
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install -y libolm-dev libmagic1
- uses: actions/checkout@v2
- run: sudo apt-get install -y libmagic1
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v2
with:
python-version: "3.11"
- run: python -m pip install tox
- run: python -m pip install tox "poetry==1.8.3"
- run: tox -e check_codestyle

check-types:
name: Check types with Mypy
runs-on: ubuntu-latest
steps:
- run: sudo apt-get install -y libolm-dev libmagic1
- uses: actions/checkout@v2
- run: sudo apt-get install -y libmagic1
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v2
with:
python-version: "3.11"
- run: python -m pip install tox
- run: python -m pip install tox "poetry==1.8.3"
- run: tox -e check_types

unit-tests:
Expand All @@ -36,13 +40,14 @@ jobs:
matrix:
# Run the unit tests both against our oldest supported Python version
# and the newest stable.
python_version: [ "3.8", "3.11" ]
python_version: [ "3.10", "3.12" ]
steps:
- run: sudo apt-get install -y libolm-dev libmagic1
- uses: actions/checkout@v2
- run: sudo apt-get install -y libmagic1
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python_version }}
- run: python -m pip install tox
- run: python -m pip install tox "poetry==1.8.3"
- run: tox -e py

9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@ config.yaml
/build
/.vscode
mcs_pickle.txt
pickle
pickle

# Poetry will create a setup.py, which we don't want to include.
/setup.py

# rust
/target/
/src/matrix_content_scanner/*.so
Loading

0 comments on commit dd35a49

Please sign in to comment.