Skip to content

replace conda/nuitka with standalone python builds [CPP-310][CPP-322][CPP-321] #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 144 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
144 commits
Select commit Hold shift + click to select a range
8055b3b
python packaging experiment
Aug 25, 2021
0d7fc14
parse cli args again
Aug 25, 2021
9067fa6
fix-up compression script
Aug 25, 2021
bd9e70a
add more purging
Aug 25, 2021
a7e3d40
more purging
Aug 25, 2021
4b6705b
more purging
Aug 25, 2021
330f60e
try flit
Aug 26, 2021
15b7eba
add ignore
Aug 26, 2021
1d3f80b
update
Aug 26, 2021
d676dae
update
Aug 26, 2021
2c6fc5d
update args
Aug 26, 2021
31e1e1f
clean-up
Sep 3, 2021
907da2c
remove unused file
Sep 3, 2021
4bf8928
Merge branch 'main' into steve/python-packaging
notoriaga Oct 3, 2021
8c6c2cc
unix python download script
notoriaga Oct 3, 2021
219db8d
more unix scripts
notoriaga Oct 3, 2021
a95c273
add makefile commands
notoriaga Oct 4, 2021
464f509
fix line endings
notoriaga Oct 4, 2021
b5961c2
add dist to gitignore
notoriaga Oct 4, 2021
6613bff
add setup task
notoriaga Oct 4, 2021
ecd4813
remove conda.yml
notoriaga Oct 4, 2021
25af38f
update readme
notoriaga Oct 4, 2021
7625936
update makefile
notoriaga Oct 4, 2021
0462327
remove log
notoriaga Oct 4, 2021
b0d0770
rsync
notoriaga Oct 4, 2021
0e1c84b
fix rsync cmd
notoriaga Oct 4, 2021
68ecee7
tweak cli filter
notoriaga Oct 4, 2021
3e16029
remove more conda
notoriaga Oct 4, 2021
5f7646c
remove requirments.txt
notoriaga Oct 4, 2021
5d3e943
remove pip install tasks
notoriaga Oct 4, 2021
d88e330
use pyproject toml as build cache key
notoriaga Oct 4, 2021
a950d76
ci fix
notoriaga Oct 4, 2021
c8b9b1c
fmt
notoriaga Oct 4, 2021
cec248b
Merge branch 'main' into steve/python-packaging
notoriaga Oct 4, 2021
39b75ec
ignore get-pip
notoriaga Oct 4, 2021
87a1852
lints
notoriaga Oct 4, 2021
ddd0da5
try setting powershell
notoriaga Oct 4, 2021
6a0fe3b
ignore lint
notoriaga Oct 4, 2021
a0004cc
install pyside2-tools
notoriaga Oct 4, 2021
c72e22c
ignore console_resources
notoriaga Oct 4, 2021
ab74541
try powershell
notoriaga Oct 4, 2021
a58415f
windows
notoriaga Oct 4, 2021
5035ade
mypy.init
notoriaga Oct 4, 2021
6828500
ignore mypy
notoriaga Oct 4, 2021
4b20f25
brackets?
notoriaga Oct 4, 2021
39c48ba
cleanup makefile
notoriaga Oct 5, 2021
430fd47
test
notoriaga Oct 5, 2021
95b13a5
powershell fix
notoriaga Oct 5, 2021
105ac95
fix windows path
notoriaga Oct 5, 2021
a61396d
py exe fix
notoriaga Oct 5, 2021
c57f9e3
fix env script
notoriaga Oct 5, 2021
76457a3
log
notoriaga Oct 5, 2021
d0de272
log
notoriaga Oct 5, 2021
8e01df5
remove fbs
notoriaga Oct 5, 2021
a4d58d5
Merge branch 'steve/python-packaging' of github.com:swift-nav/console…
notoriaga Oct 5, 2021
2c25f9a
log
notoriaga Oct 5, 2021
3b1f3d6
fix mac wheel name
notoriaga Oct 5, 2021
8652ab3
remove log
notoriaga Oct 5, 2021
2ca9bb2
ci-build.sh updates
notoriaga Oct 5, 2021
2d1187a
remove dot prefix
notoriaga Oct 5, 2021
f3518df
remove scripts
notoriaga Oct 5, 2021
a7a6e18
cleanup
notoriaga Oct 5, 2021
f8b04dc
add fd
notoriaga Oct 5, 2021
4908303
download fd
notoriaga Oct 5, 2021
92ea63e
fmt
notoriaga Oct 5, 2021
4a0b337
add frozen
notoriaga Oct 5, 2021
0177012
move get-pip.py
notoriaga Oct 5, 2021
0906e72
fix wheel install
notoriaga Oct 5, 2021
9a8f614
fix purge
notoriaga Oct 5, 2021
6d27164
portable xargs
notoriaga Oct 5, 2021
83762aa
purge 2
notoriaga Oct 6, 2021
8e0d7e0
remove build-dist
notoriaga Oct 6, 2021
9130ead
cleanup
notoriaga Oct 6, 2021
0458148
more cleanpu
notoriaga Oct 6, 2021
3b0976b
cleanup
notoriaga Oct 6, 2021
b676d3e
even more cleanup
notoriaga Oct 6, 2021
586cc4a
store version
notoriaga Oct 6, 2021
f96439a
download get-pip
notoriaga Oct 6, 2021
c655e65
fix setup-builder
notoriaga Oct 6, 2021
bd6fcc8
more purging
notoriaga Oct 6, 2021
1e694de
cleanup py dl
notoriaga Oct 6, 2021
67d4796
more cleanup
notoriaga Oct 6, 2021
0cf6623
mac updates
notoriaga Oct 6, 2021
0856ad2
remove windows py dl
notoriaga Oct 6, 2021
ea2ffa8
formatting
notoriaga Oct 6, 2021
f43dad9
use python to prepend lines
notoriaga Oct 6, 2021
d13d3cf
ignore console_resources
notoriaga Oct 6, 2021
1131acb
remove console_resources
notoriaga Oct 6, 2021
4f9d368
call gen-resources when setting up builder
notoriaga Oct 6, 2021
3c6e87e
refactor generate-resources
notoriaga Oct 6, 2021
0fd688d
quack
notoriaga Oct 6, 2021
8f84a2d
more purging
notoriaga Oct 6, 2021
d271a65
remove parallel
notoriaga Oct 6, 2021
676cbc4
eprintln -> debug
notoriaga Oct 6, 2021
b9bd48a
more purging
notoriaga Oct 7, 2021
ffab188
more purging
notoriaga Oct 7, 2021
a8edac6
include console_resources.py
notoriaga Oct 7, 2021
5fe6e72
set python for rcc
notoriaga Oct 7, 2021
f9226ea
Merge branch 'main' into steve/python-packaging
notoriaga Oct 7, 2021
92316d1
more purges
notoriaga Oct 7, 2021
fc92998
use more threads with xz
notoriaga Oct 7, 2021
8a924fe
more purging
notoriaga Oct 7, 2021
7b2565d
even more purging
notoriaga Oct 7, 2021
239d7d7
more purging
notoriaga Oct 7, 2021
716b466
more purging
notoriaga Oct 7, 2021
68afcde
remove bins
notoriaga Oct 7, 2021
8790050
more purging
notoriaga Oct 7, 2021
542159e
more purging
notoriaga Oct 7, 2021
cfd81ed
upload before checking size
notoriaga Oct 7, 2021
8f4b27d
more purging
notoriaga Oct 7, 2021
782d5c5
change installer bench
notoriaga Oct 7, 2021
86cebfd
print xz version
notoriaga Oct 8, 2021
5d802e2
update ci
notoriaga Oct 8, 2021
dd056a2
ci
notoriaga Oct 8, 2021
e146778
Merge branch 'main' into steve/python-packaging
notoriaga Oct 8, 2021
b6874fd
try setting shebang
notoriaga Oct 8, 2021
0fe435a
try entrypoint bin
notoriaga Oct 8, 2021
9bcbe78
windows
notoriaga Oct 8, 2021
c8f8f13
strip entrypoint
notoriaga Oct 8, 2021
7eff41b
bench = false
notoriaga Oct 8, 2021
296a0e7
don't strip on windows
notoriaga Oct 8, 2021
fa1693c
bash
notoriaga Oct 9, 2021
a82ec4b
up one more dir for windows
notoriaga Oct 9, 2021
5edf035
fix frozen
notoriaga Oct 11, 2021
7d58a3a
lint
notoriaga Oct 11, 2021
d08e0a6
try different tar command
notoriaga Oct 11, 2021
0e3d893
Merge branch 'main' into steve/python-packaging
notoriaga Oct 11, 2021
1cf21cd
try windows workaround
notoriaga Oct 12, 2021
9709177
only windows
notoriaga Oct 12, 2021
4d62ac1
log
notoriaga Oct 12, 2021
9c6fc70
fix some windows purging
notoriaga Oct 12, 2021
d6e146d
remove old fbs stuff
notoriaga Oct 12, 2021
b4880da
7z
notoriaga Oct 12, 2021
5c9c5e9
Merge branch 'main' into steve/python-packaging
notoriaga Oct 12, 2021
7edc4b7
cleanup
notoriaga Oct 12, 2021
6c03a06
readme
notoriaga Oct 12, 2021
c6ad4f4
hmmm
notoriaga Oct 12, 2021
c56c425
try sh
notoriaga Oct 12, 2021
30f6244
!!!!!!!
notoriaga Oct 12, 2021
96d6c0b
chmod
notoriaga Oct 12, 2021
aa0fef3
add back cargo config
notoriaga Oct 12, 2021
751b8a8
add zstd instructions
notoriaga Oct 12, 2021
6f2027e
Merge branch 'main' into steve/python-packaging
notoriaga Oct 13, 2021
a7d5c8b
set mac deployment target
notoriaga Oct 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
src/main/fbs/* linguist-vendored
src/main/nuitka/* linguist-vendored
"console_backend/tests/data/*" filter=lfs diff=lfs merge=lfs -text
55 changes: 0 additions & 55 deletions .github/ci-build.sh

This file was deleted.

131 changes: 72 additions & 59 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ env:
RUST_CACHE_DIRS: "~/.cargo/registry\n~/.cargo/git\ntarget\n"
LIBCLANG_PATH_WIN: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/Llvm/x64/bin"
CARGO_MAKE_VERSION: 0.35.0
MINICONDA_VERSION: "py38_4.10.3"
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-C debuginfo=0"

Expand Down Expand Up @@ -76,29 +75,23 @@ jobs:
toolchain: stable

- uses: Swatinem/rust-cache@v1

- uses: davidB/rust-cargo-make@v1
with:
version: ${{ env.CARGO_MAKE_VERSION }}

- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: console_pp
environment-file: conda.yml
miniconda-version: ${{ env.MINICONDA_VERSION }}

- name: Cache pip
uses: actions/cache@v2
with:
path: ${{ env.PIP_CACHE_DIR }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
key: ${{ runner.os }}-pyproject-toml-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-pyproject-toml-
${{ runner.os }}-

- name: Run Pip Install
- name: Set up python builder
run: |
cargo make pip-install-dev
cargo make setup-builder

- name: Run Backend Benchmarks (Windows)
env:
Expand Down Expand Up @@ -153,26 +146,19 @@ jobs:
run: |
sudo apt-get update && sudo apt-get install -y capnproto libudev-dev

- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: console_pp
environment-file: conda.yml
miniconda-version: ${{ env.MINICONDA_VERSION }}

- name: Run Requirements Generation Check
run: |
cargo make poetry-export
git diff --exit-code

- name: Cache pip
uses: actions/cache@v2
with:
path: ${{ env.PIP_CACHE_DIR }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
key: ${{ runner.os }}-pyproject-toml-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-pyproject-toml-
${{ runner.os }}-

- name: Set up python builder
run: |
cargo make setup-builder

- name: Run Checks
run: |
cargo make check-all
Expand Down Expand Up @@ -266,56 +252,53 @@ jobs:
with:
version: ${{ env.CARGO_MAKE_VERSION }}

- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: console_pp
environment-file: conda.yml
miniconda-version: ${{ env.MINICONDA_VERSION }}

- name: Cache pip
uses: actions/cache@v2
with:
path: ${{ env.PIP_CACHE_DIR }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
key: ${{ runner.os }}-pyproject-toml-${{ hashFiles('pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-pyproject-toml-
${{ runner.os }}-

- name: Run Pip Install
- name: Set up python builder
run: |
cargo make pip-install-dev
cargo make setup-builder

- name: Build ${{ runner.os }} Binaries.
env:
LIBCLANG_PATH: ${{ env.LIBCLANG_PATH_WIN }}
run: |
cargo make prod-installer
cargo make create-dist
if: matrix.os == 'windows-2019'

- name: Build ${{ runner.os }} Binaries.
shell: bash
run: |
cargo make prod-installer
cargo make create-dist
if: matrix.os != 'windows-2019'

- name: Pull Git LFS objects
run: git lfs pull
env:
GIT_SSH_COMMAND: ssh -o StrictHostKeyChecking=no
- name: Zip ${{ runner.os }} Binaries.
- name: Archive ${{ runner.os }} Binaries.
env:
OS_NAME: ${{ runner.os }}
shell: bash
run: |
bash ./.github/ci-build.sh
mkdir bench
cp -r console_backend/tests/data bench
cp utils/bench_runner.py bench
cd bench
7z a -tzip "../$OS_NAME.zip" *;
cd ..
echo "${OS_NAME}.zip" >bench-archive.filename;
echo "BENCH_ARCHIVE=$(cat bench-archive.filename)" >>$GITHUB_ENV

RELEASE_ARCHIVE=$(find . -maxdepth 1 -iname "*.tar.xz")
echo $RELEASE_ARCHIVE >release-archive.filename
echo "RELEASE_ARCHIVE=$(cat release-archive.filename)" >>$GITHUB_ENV
echo "BENCH_ARCHIVE=$(cat bench.filename)" >>$GITHUB_ENV
- name: ${{ runner.os }} Installer Size Benchmark.
env:
OS_NAME: ${{ runner.os }}
shell: bash
run: |
cargo make disk-usage-bench
- uses: actions/upload-artifact@v2
with:
name: ${{ runner.os }}-artifacts
Expand All @@ -327,7 +310,13 @@ jobs:
name: ${{ runner.os }}-artifacts-bench
path: |
${{ env.BENCH_ARCHIVE }}
bench.filename
bench-archive.filename
- name: ${{ runner.os }} Installer Size Benchmark.
env:
OS_NAME: ${{ runner.os }}
shell: bash
run: |
cargo make disk-usage-bench
frontend_bench:
name: Run Frontend Benchmarks
timeout-minutes: 30
Expand All @@ -344,38 +333,62 @@ jobs:
- name: Remove previous build.
shell: bash
run: |
rm -rf output
rm -rf console
rm -rf bench

- uses: actions/download-artifact@v2
with:
name: ${{ matrix.os }}-artifacts
path: |
console

- uses: actions/download-artifact@v2
with:
name: ${{ matrix.os }}-artifacts-bench
path: |
output
bench

- name: Extract binary and data.
shell: bash
run: |
cd output
7z x $(cat bench.filename) -aoa -o${{ matrix.os }}
cd console
archive=$(cat release-archive.filename)
7z x $archive -aoa
7z x ${archive%.xz} -aoa
echo "extracted release-archive"
mv ../bench/${{ matrix.os }}.zip .
7z x ${{ matrix.os }}.zip -aoa
echo "extracted bench data"

- name: Run CPU Frontend Benchmark.
shell: bash
run: |
cd output/${{ matrix.os }}
cd console
if [ "$RUNNER_OS" == "Windows" ]; then
python bench_runner.py --frontend_cpu --executable=swift_navigation_console.exe
python ./bench_runner.py --frontend_cpu --executable="${GITHUB_WORKSPACE}/console/Scripts/swiftnav-console.exe"
elif [ "$RUNNER_OS" == "macOS" ]; then
python bench_runner.py --frontend_cpu --executable=./main
chmod +x "${GITHUB_WORKSPACE}/console/bin/swiftnav-console"
chmod +x "${GITHUB_WORKSPACE}/console/bin/python3"
python ./bench_runner.py --frontend_cpu --executable="${GITHUB_WORKSPACE}/console/bin/swiftnav-console"
elif [ "$RUNNER_OS" == "Linux" ]; then
python bench_runner.py --frontend_cpu --executable=./swift_navigation_console
chmod +x "${GITHUB_WORKSPACE}/console/bin/swiftnav-console"
chmod +x "${GITHUB_WORKSPACE}/console/bin/python3"
python ./bench_runner.py --frontend_cpu --executable="${GITHUB_WORKSPACE}/console/bin/swiftnav-console"
fi
- name: Run MEM Frontend Benchmark.
shell: bash
run: |
cd output/${{ matrix.os }}
cd console
if [ "$RUNNER_OS" == "Windows" ]; then
python bench_runner.py --frontend_mem --executable=swift_navigation_console.exe
python ./bench_runner.py --frontend_mem --executable="${GITHUB_WORKSPACE}/console/Scripts/swiftnav-console.exe"
elif [ "$RUNNER_OS" == "macOS" ]; then
python bench_runner.py --frontend_mem --executable=./main
chmod +x "${GITHUB_WORKSPACE}/console/bin/swiftnav-console"
chmod +x "${GITHUB_WORKSPACE}/console/bin/python3"
python ./bench_runner.py --frontend_mem --executable="${GITHUB_WORKSPACE}/console/bin/swiftnav-console"
elif [ "$RUNNER_OS" == "Linux" ]; then
python bench_runner.py --frontend_mem --executable=./swift_navigation_console
chmod +x "${GITHUB_WORKSPACE}/console/bin/swiftnav-console"
chmod +x "${GITHUB_WORKSPACE}/console/bin/python3"
python ./bench_runner.py --frontend_mem --executable="${GITHUB_WORKSPACE}/console/bin/swiftnav-console"
fi


Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ target
*.dist
main.app/
*.dmg
*.tar.xz
*.tar
.DS_Store
src/main/python/console_resources.py
swiftnav_console/console_resources.py
*.*~
py39-dist/
py39/
dist/
console_backend/tests/fileout.json
get-pip.py
Empty file added .python/.gitignore
Empty file.
4 changes: 4 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ["console_backend"]
members = ["console_backend", "entrypoint"]

[profile.release]
lto = true
Expand Down
Loading