diff --git a/.github/workflows/docker_test.yml b/.github/workflows/docker_test.yml new file mode 100644 index 0000000..9ad2c23 --- /dev/null +++ b/.github/workflows/docker_test.yml @@ -0,0 +1,28 @@ +name: Docker Tests + +on: [push] + +jobs: + docker-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and test Debian container + run: | + docker compose build debian + docker compose run debian pytest tests + + - name: Build and test Ubuntu container + run: | + docker compose build ubuntu + docker compose run ubuntu pytest tests + + # Windows container tests are commented out until Windows container support is fully implemented + #- name: Build and test Windows container + # run: | + # docker compose build windows + # docker compose run windows pytest tests diff --git a/src/python_compile/assets/entrypoint.sh b/src/python_compile/assets/entrypoint.sh index d20f481..0ba55fa 100644 --- a/src/python_compile/assets/entrypoint.sh +++ b/src/python_compile/assets/entrypoint.sh @@ -27,7 +27,7 @@ else echo "Did not find any .whl files in root directory" fi -python3 -m nuitka --standalone --follow-imports --onefile --lto=yes --python-flag=-OO /host_dir/"$@" +python3 -m nuitka --assume-yes-for-downloads --standalone --follow-imports --onefile --lto=yes --python-flag=-OO /host_dir/"$@" for file in $(find . -maxdepth 1 -type f -name "*.bin"); do chmod +x "$file"; done for file in $(find . -maxdepth 1 -type f -name "*.bin"); do gzip "$file"; done diff --git a/src/python_compile/native_build.py b/src/python_compile/native_build.py index 88aadf0..dcf25c2 100644 --- a/src/python_compile/native_build.py +++ b/src/python_compile/native_build.py @@ -33,6 +33,7 @@ def generate_cmd_list(app_py: Path) -> list[str]: """Generate the command list.""" head_cmd_list = ["python", "-m", "nuitka"] body_cmd_list = [ + "--assume-yes-for-downloads", "--standalone", "--follow-imports", "--onefile",