Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
ci: fix lib postal build
Browse files Browse the repository at this point in the history
  • Loading branch information
oknozor committed Oct 27, 2023
1 parent ad37e1e commit 38f23fd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:

- uses: Swatinem/rust-cache@v2
with:
cache-targets: true
cache-on-failure: true
cache-all-crates: true
cache-targets: "true"
cache-on-failure: "true"
cache-all-crates: "true"
shared-key: "debug-build"

- name: Configure sysctl limits
Expand Down Expand Up @@ -77,9 +77,9 @@ jobs:

- uses: Swatinem/rust-cache@v2
with:
cache-targets: true
cache-on-failure: true
cache-all-crates: true
cache-targets: "true"
cache-on-failure: "true"
cache-all-crates: "true"
shared-key: "debug-build"

- name: Run cargo fmt
Expand Down Expand Up @@ -114,19 +114,19 @@ jobs:

- name: Get lib postal
run: |
apt-get update && apt-get install -y \
sudo apt-get update && sudo apt-get install -y \
autoconf automake build-essential curl git libsnappy-dev libtool pkg-config llvm-dev libclang-dev clang
git clone https://github.com/openvenues/libpostal
cd /libpostal
- name: Install libpostal
run: |
cd libpostal
./bootstrap.sh
mkdir -p /opt/libpostal_data
./configure --datadir=/opt/libpostal_data
make -j4
make install
ldconfig
sudo make install
sudo ldconfig
pkg-config --cflags libpostal
- name: Run cargo build
Expand Down
14 changes: 7 additions & 7 deletions crates/libs/tagger/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ use std::path::PathBuf;

use once_cell::sync::OnceCell;

#[cfg(feature = "postal")]
pub use crate::tagger::address::{AddressTag, ADDRESS_TAGGER};
use crate::tagger::location::{
CITY_DISTRICT_TAGGER, COUNTRY_TAGGER, DISTRICT_TAGGER, SUBURBS_TAGGER,
};
pub use crate::tagger::{
brand::BRAND_AUTOCOMPLETE_TAGGER, brand::BRAND_TAGGER, category::CATEGORY_AUTOCOMPLETE_TAGGER,
category::CATEGORY_TAGGER, location::CITY_TAGGER, location::STATE_TAGGER, Tag, TaggedPart,
Tagger, TaggerAutocomplete,
};
#[cfg(feature = "postal")]
pub use crate::tagger::address::{ADDRESS_TAGGER, AddressTag};
use crate::tagger::location::{
CITY_DISTRICT_TAGGER, COUNTRY_TAGGER, DISTRICT_TAGGER, SUBURBS_TAGGER,
};
pub use crate::tokens::{Span, Tokenizer};
pub use crate::tokens::normalize_diacritics;
use crate::tokens::Tokenized;
pub use crate::tokens::{Span, Tokenizer};

pub mod errors;
mod tagger;
Expand Down Expand Up @@ -318,9 +318,9 @@ fn mark_tagged(tagged: &mut [bool], tokenized: &Tokenized) {

#[cfg(test)]
mod test {
use crate::TaggerQueryBuilder;
use crate::tagger::{Tag, TaggedPart};
use crate::tokens::Span;
use crate::TaggerQueryBuilder;

#[test]
fn brand_with_accent() {
Expand Down

0 comments on commit 38f23fd

Please sign in to comment.