From a9d4b5d4fae88ed41c7ccc580e0cec871b74d5da Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 24 Mar 2024 08:39:04 +0300 Subject: [PATCH] Added GitLab CI example (#71) * Test gitlab ci * Added gitlab pipeline * Update gitlab ci * Added artifacts * Update artifacts paths * Update artifacts paths * Update artifacts paths * Update artifacts paths * Update artifacts paths * Added exampmple for all images * Update artifacts paths * Update artifacts paths * Added install requirements * Remove osx job * Added example for GitLab CI * Added example for GitLab CI * Update build jobs * Update artifacts paths --------- Co-authored-by: Fedor Batonogov --- .github/workflows/docker-image-linux-ghcr.yml | 1 - .github/workflows/docker-image-osx-ghcr.yml | 1 - .../workflows/docker-image-windows-ghcr.yml | 1 - .gitlab-ci.yml | 51 +++++++++++++++++++ README.md | 27 +++++++++- 5 files changed, 77 insertions(+), 4 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/docker-image-linux-ghcr.yml b/.github/workflows/docker-image-linux-ghcr.yml index f4c3c46..73e12f2 100644 --- a/.github/workflows/docker-image-linux-ghcr.yml +++ b/.github/workflows/docker-image-linux-ghcr.yml @@ -20,7 +20,6 @@ env: jobs: build: - runs-on: ubuntu-latest permissions: contents: read diff --git a/.github/workflows/docker-image-osx-ghcr.yml b/.github/workflows/docker-image-osx-ghcr.yml index 8b17bab..c6d669e 100644 --- a/.github/workflows/docker-image-osx-ghcr.yml +++ b/.github/workflows/docker-image-osx-ghcr.yml @@ -20,7 +20,6 @@ env: jobs: build: - runs-on: ubuntu-latest permissions: contents: read diff --git a/.github/workflows/docker-image-windows-ghcr.yml b/.github/workflows/docker-image-windows-ghcr.yml index c16c444..bea754e 100644 --- a/.github/workflows/docker-image-windows-ghcr.yml +++ b/.github/workflows/docker-image-windows-ghcr.yml @@ -20,7 +20,6 @@ env: jobs: build: - runs-on: ubuntu-latest permissions: contents: read diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..067208e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,51 @@ +windows_bin: + stage: deploy + image: + name: batonogov/pyinstaller-windows:latest + entrypoint: [''] + script: + - echo "Creating Windows artifact" + - pip install -r ./test/requirements.txt + - cd ./test && pyinstaller --onefile main.py + - cp ./dist/*.exe ../ + rules: + - when: always + artifacts: + paths: + - '*.exe' + when: always + expire_in: 2 week + +linux_bin: + stage: deploy + image: + name: batonogov/pyinstaller-linux:latest + entrypoint: [''] + script: + - echo "Creating Linux artifact" + - pip install -r ./test/requirements.txt + - cd ./test && pyinstaller --onefile main.py + rules: + - when: always + artifacts: + paths: + - ./test/dist/* + when: always + expire_in: 2 week + +linux_slim_bin: + stage: deploy + image: + name: batonogov/pyinstaller-linux:latest-slim + entrypoint: [''] + script: + - echo "Creating Linux artifact" + - pip install -r ./test/requirements.txt + - cd ./test && pyinstaller --onefile main.py + rules: + - when: always + artifacts: + paths: + - ./test/dist/* + when: always + expire_in: 2 week diff --git a/README.md b/README.md index 4e41d51..a8ca65a 100644 --- a/README.md +++ b/README.md @@ -90,15 +90,40 @@ will generate a `spec` file for `your-script.py` in your current working directo ### How do I change the PyInstaller version used? -Add `pyinstaller==6.3.0` to your `requirements.txt`. +Add `pyinstaller==6.4.0` to your `requirements.txt`. ### Is it possible to use a package mirror? Yes, by supplying the `PYPI_URL` and `PYPI_INDEX_URL` environment variables that point to your PyPi mirror. +### How do I use image in GitLab CI? + +See [example](.gitlab-ci.yml) for GitLab CI. + +```gitlab_ci +windows_bin: + stage: deploy + image: + name: batonogov/pyinstaller-windows:latest + entrypoint: [''] + script: + - echo "Creating Windows artifact" + - pip install -r ./test/requirements.txt + - cd ./test && pyinstaller --onefile main.py + - cp ./build/*.exe ../ + rules: + - when: always + artifacts: + paths: + - '*.exe' + when: always + expire_in: 2 week +``` + ## Known Issues [ntdll.so Path Missing](https://github.com/batonogov/docker-pyinstaller/issues/23) + [Outdated Microsoft C++ Build Tools](https://github.com/batonogov/docker-pyinstaller/issues/11) ## History