From 283b2a8bb0a7cfdc182de1dcd5d12ef25b73b235 Mon Sep 17 00:00:00 2001 From: lr222gw Date: Sat, 6 Jan 2024 18:13:22 +0100 Subject: [PATCH 1/6] WIP: Build for Linux, Mac Os and Windows --- .github/workflows/build.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 09d8325..2e86bc3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,11 @@ jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + os: [windows-latest, macos-latest, ubuntu-latest] + + steps: - name: Checkout code uses: actions/checkout@v4 @@ -24,17 +29,9 @@ jobs: pip install pyinstaller pip install pyqt5 - - name: Build for Windows - run: pyinstaller --onefile cpppc.py - if: runner.os == 'Windows' - - - name: Build for macOS - run: pyinstaller --onefile cpppc.py - if: runner.os == 'macOS' - - - name: Build for Linux + - name: Build run: pyinstaller --onefile cpppc.py - if: runner.os == 'Linux' + if: matrix.os == runner.os - name: Archive artifacts uses: actions/upload-artifact@v4 From 4f82d92aea624ecfdd996e7bde966969fa8c7241 Mon Sep 17 00:00:00 2001 From: lr222gw Date: Sat, 6 Jan 2024 18:21:50 +0100 Subject: [PATCH 2/6] WIP: Artefacts was not uploaded... --- .github/workflows/build.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2e86bc3..f8d9980 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,12 @@ jobs: if: matrix.os == runner.os - name: Archive artifacts + run: zip -r executables-${{ matrix.os }}.zip dist/ + if: matrix.os == runner.os + + - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: executables - path: dist/ + name: executables-${{ matrix.os }} + path: executables-${{ matrix.os }}.zip + From 6567cb7d7ed2e66601f6c950fb24451b5411d8e4 Mon Sep 17 00:00:00 2001 From: lr222gw Date: Sat, 6 Jan 2024 19:05:24 +0100 Subject: [PATCH 3/6] WIP: try to remove condition --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f8d9980..4710d4e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -31,11 +31,11 @@ jobs: - name: Build run: pyinstaller --onefile cpppc.py - if: matrix.os == runner.os + - name: Archive artifacts run: zip -r executables-${{ matrix.os }}.zip dist/ - if: matrix.os == runner.os + - name: Upload artifacts uses: actions/upload-artifact@v4 From b639e472da7155dc6561fc1e2e3ed55e87c7e8d6 Mon Sep 17 00:00:00 2001 From: lr222gw Date: Sat, 6 Jan 2024 19:27:30 +0100 Subject: [PATCH 4/6] WIP: Trying different approach --- .github/workflows/build.yml | 40 ++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4710d4e..4ff9048 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,14 +7,9 @@ on: workflow_dispatch: jobs: - build: + build_linux: runs-on: ubuntu-latest - - strategy: - matrix: - os: [windows-latest, macos-latest, ubuntu-latest] - steps: - name: Checkout code uses: actions/checkout@v4 @@ -34,12 +29,39 @@ jobs: - name: Archive artifacts - run: zip -r executables-${{ matrix.os }}.zip dist/ + run: zip -r executables-linux.zip dist/ - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: executables-${{ matrix.os }} - path: executables-${{ matrix.os }}.zip + name: executables-linux + path: executables-linux.zip + + build_windows: + runs-on: windows-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Install dependencies + run: | + pip install pyinstaller + pip install pyqt5 + - name: Build + run: pyinstaller --onefile cpppc.py + + - name: Archive artifacts + run: zip -r executables-windows.zip dist/ + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: executables-windows + path: executables-windows.zip From ac553aff6ea3b1fb9752db2fde67389f50cf35d5 Mon Sep 17 00:00:00 2001 From: lr222gw Date: Sat, 6 Jan 2024 19:32:38 +0100 Subject: [PATCH 5/6] FIX: Changes zip program on windows --- .github/workflows/build.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ff9048..d5ebd0a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -58,10 +58,40 @@ jobs: run: pyinstaller --onefile cpppc.py - name: Archive artifacts - run: zip -r executables-windows.zip dist/ + run: Compress-Archive -Path .\dist\* -DestinationPath executables-windows.zip - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: executables-windows path: executables-windows.zip + + build_macos: + runs-on: macos-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Install dependencies + run: | + pip install pyinstaller + pip install pyqt5 + + - name: Build + run: pyinstaller --onefile cpppc.py + + - name: Archive artifacts + run: zip -r executables-macos.zip dist/ + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + + with: + name: executables-macos + path: executables-macos.zip + \ No newline at end of file From 877c08e3ce97d7f3fd69cd7a0b2e6a3ac5688f39 Mon Sep 17 00:00:00 2001 From: lr222gw Date: Sat, 6 Jan 2024 19:38:41 +0100 Subject: [PATCH 6/6] FIX: Remove double compression... --- .github/workflows/build.yml | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d5ebd0a..a75e865 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,16 +27,11 @@ jobs: - name: Build run: pyinstaller --onefile cpppc.py - - - name: Archive artifacts - run: zip -r executables-linux.zip dist/ - - - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: executables-linux - path: executables-linux.zip + name: executable-linux + path: dist/ build_windows: runs-on: windows-latest @@ -57,14 +52,11 @@ jobs: - name: Build run: pyinstaller --onefile cpppc.py - - name: Archive artifacts - run: Compress-Archive -Path .\dist\* -DestinationPath executables-windows.zip - - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: executables-windows - path: executables-windows.zip + name: executable-windows + path: dist/ build_macos: runs-on: macos-latest @@ -85,13 +77,10 @@ jobs: - name: Build run: pyinstaller --onefile cpppc.py - - name: Archive artifacts - run: zip -r executables-macos.zip dist/ - - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: executables-macos - path: executables-macos.zip + name: executable-macos + path: dist/ \ No newline at end of file