-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Build backend | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build_backend: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Install PDM | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pdm | ||
- name: Install dependencies | ||
run: | | ||
pdm install | ||
- name: Make boreholes | ||
run: | | ||
# Temporarily, a patched version of assimp lives in the 'test' dir | ||
# It was installed and built via 'pdm install' | ||
ASSIMP_VER=5.2.5 | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/test/assimp-$ASSIMP_VER/bin | ||
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" | ||
pushd web_build | ||
./make_boreholes.py -b batch.txt -d query_data.db boreholes | ||
tar cvfz boreholes.tag.gz ./boreholes | ||
rm -rf boreholes | ||
popd | ||
- name: Upload borehole data | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: boreholes.tar.gz | ||
path: web_build/boreholes.tar.gz | ||
if-no-files-found: error | ||
- name: Make API directory | ||
run: | | ||
pushd scripts | ||
./build_api_dir.sh ../web_build/query_data.db | ||
popd | ||
- name: Upload API directory | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: api.tar | ||
path: scripts/api.tar | ||
if-no-files-found: error | ||
|
||
|