Skip to content

Commit

Permalink
Merge pull request #110 from AISViz/frontend-proxy-remove
Browse files Browse the repository at this point in the history
Frontend proxy remove
  • Loading branch information
Jinnkunn authored Oct 25, 2024
2 parents cf1574c + 6dab7ae commit 737d75c
Show file tree
Hide file tree
Showing 7 changed files with 574 additions and 461 deletions.
168 changes: 133 additions & 35 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
password: ${{ secrets.PGPASS }}

- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
Expand All @@ -53,6 +53,12 @@ jobs:
override: true
cache: true

- name: Install wasm-pack
run: |
cargo install --locked wasm-pack --verbose
cargo install --locked wasm-bindgen-cli --verbose
cargo install --locked wasm-opt --verbose
- name: Create Python Virtual Environment and Install Dependencies
run: |
python -m venv AISdb
Expand Down Expand Up @@ -89,10 +95,10 @@ jobs:
${{ runner.os }}-cargo-
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
Expand All @@ -102,6 +108,13 @@ jobs:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
source $HOME/.cargo/env
- name: Install wasm-pack
run: |
cargo install --locked wasm-pack --verbose
cargo install --locked wasm-bindgen-cli --verbose
cargo install --locked wasm-opt --verbose
wasm-pack --version
- name: Setup PostgreSQL
run: |
Expand Down Expand Up @@ -148,10 +161,10 @@ jobs:
${{ runner.os }}-cargo-
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
Expand All @@ -161,6 +174,27 @@ jobs:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
source $HOME/.cargo/env
- name: Install LLVM and Configure clang
run: |
brew install llvm
export PATH="$(brew --prefix llvm)/bin:$PATH"
export CC="$(brew --prefix llvm)/bin/clang --target=wasm32-unknown-unknown"
echo "export PATH=$PATH" >> $GITHUB_ENV
echo "CC=$CC" >> $GITHUB_ENV
- name: Install zlib and Ensure pkg-config is Correctly Configured
run: |
brew install zlib
export PKG_CONFIG_PATH=$(brew --prefix zlib)/lib/pkgconfig
echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
- name: Install wasm-pack
run: |
cargo install --locked wasm-pack --verbose
cargo install --locked wasm-bindgen-cli --verbose
cargo install --locked wasm-opt --verbose
wasm-pack --version
- name: Install PostgreSQL
run: |
Expand Down Expand Up @@ -198,47 +232,77 @@ jobs:
matrix:
target: [ x86_64, x86 ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
manylinux: auto
before-script-linux: |
# If we're running on rhel centos, install needed packages.
if command -v yum &> /dev/null; then
yum update -y && yum install -y perl-core openssl openssl-devel pkgconfig libatomic unzip

- name: Install dependencies
run: |
if command -v yum &> /dev/null; then
sudo yum update -y && sudo yum install -y perl-core openssl openssl-devel pkgconfig libatomic clang gcc-multilib
# If we're running on i686 we need to symlink libatomic
# in order to build openssl with -latomic flag.
if [[ ! -d "/usr/lib64" ]]; then
ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
sudo ln -s /usr/lib/libatomic.so.1 /usr/lib/libatomic.so
fi
echo "finished yum install"
else
# If we're running on debian-based system.
apt update -y && apt-get install -y libssl-dev openssl pkg-config musl-tools unzip
apt-get clean
sudo apt update -y && sudo apt-get install -y libssl-dev openssl pkg-config zlib1g-dev clang gcc-multilib
echo "finished apt install"
fi
- name: Cache Rust toolchain
uses: actions/cache@v3
with:
path: C:\Users\runneradmin\.cargo
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-
- name: Install Rust Target for wasm
run: |
rustup target add wasm32-unknown-unknown
- name: install wasm-pack
run: |
cargo install --locked wasm-pack --verbose
cargo install --locked wasm-bindgen-cli --verbose
cargo install --locked wasm-opt --verbose
wasm-pack --version
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'

- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-linux-${{ matrix.target }}
path: dist

- name: Clean Up
run: |
rm -rf AISdb
rm -rf ~/.cargo
windows:
runs-on: windows-latest
needs: [sdist]
strategy:
matrix:
target: [ x64, x86 ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: ${{ matrix.target }}
Expand All @@ -250,16 +314,21 @@ jobs:
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-
- name: Install wasm-pack
run: |
cargo install --locked wasm-pack --verbose
cargo install --locked wasm-bindgen-cli --verbose
cargo install --locked wasm-opt --verbose
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-windows-${{ matrix.target }}
path: dist
- name: Clean Up
run: |
Expand All @@ -275,8 +344,8 @@ jobs:
matrix:
target: [ x86_64, aarch64 ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
Expand All @@ -287,16 +356,36 @@ jobs:
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-${{ runner.os }}-
- name: Install LLVM and Configure clang
run: |
brew install llvm
export PATH="$(brew --prefix llvm)/bin:$PATH"
export CC="$(brew --prefix llvm)/bin/clang --target=wasm32-unknown-unknown"
echo "export PATH=$PATH" >> $GITHUB_ENV
echo "CC=$CC" >> $GITHUB_ENV
- name: Install zlib and Ensure pkg-config is Correctly Configured
run: |
brew install zlib
export PKG_CONFIG_PATH=$(brew --prefix zlib)/lib/pkgconfig
echo "export PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
- name: Install Rust Target for wasm
run: |
rustup target add wasm32-unknown-unknown
- name: Install wasm-pack
run: |
cargo install --locked wasm-pack --verbose
cargo install --locked wasm-bindgen-cli --verbose
cargo install --locked wasm-opt --verbose
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --find-interpreter
sccache: 'true'
- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
name: wheels-macos-${{ matrix.target }}
path: dist
- name: Clean Up
run: |
Expand All @@ -306,14 +395,14 @@ jobs:
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Upload sdist
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: wheels
path: dist
Expand All @@ -324,7 +413,7 @@ jobs:
if: "startsWith(github.ref, 'refs/tags/')"
needs: [build-and-test-linux, build-and-test-windows, build-and-test-macos]
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: wheels
- name: Publish to PyPI
Expand All @@ -334,3 +423,12 @@ jobs:
with:
command: upload
args: --non-interactive --skip-existing *









9 changes: 9 additions & 0 deletions .github/workflows/Install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ jobs:
- name: Install Maturin
run: python -m pip install --upgrade maturin[patchelf]

- name: Install wasm-pack
run: |
cargo install --locked wasm-pack --verbose
cargo install --locked wasm-bindgen-cli --verbose
cargo install --locked wasm-opt --verbose
wasm-pack --version
wasm-bindgen-cli --version
wasm-opt --version
- name: Build and Install aisdb
run: |
source ./AISdb/bin/activate
Expand Down
Loading

0 comments on commit 737d75c

Please sign in to comment.