From fd052e6f1c9f91538738c4020f832bed378239db Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Thu, 31 Mar 2022 18:54:32 -0700 Subject: [PATCH] Fix compressing Windows builds, add skeleton for making macOS build, and start snapcraft build --- .circleci/config.yml | 47 +++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9848c57d..7a11181c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,17 +17,22 @@ workflows: requires: - test-cli # - test-gui + - build-macos: + requires: + - test-cli + # - test-gui + - build-snapcraft: + requires: + - test-cli + # - test-gui jobs: test-cli: docker: - image: cimg/python:3.9 - working_directory: ~/repo - steps: - checkout - - run: name: Install dependencies command: | @@ -36,7 +41,6 @@ jobs: pip install poetry cd ~/repo/cli poetry install - - run: name: Run tests command: | @@ -50,12 +54,9 @@ jobs: test-gui: docker: - image: cimg/python:3.9 - working_directory: ~/repo - steps: - checkout - - run: name: Install dependencies command: | @@ -64,7 +65,6 @@ jobs: sudo apt-get install -y xvfb x11-utils libxkbcommon-x11-0 libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev libxcb-render-util0 libxcb-icccm4 libxcb-keysyms1 libxcb-image0 cd ~/repo/desktop poetry install - - run: name: Run tests command: | @@ -75,7 +75,6 @@ jobs: executor: name: win/default shell: powershell.exe - steps: - checkout - run: @@ -108,7 +107,9 @@ jobs: poetry run python .\package\windows.py cleanup-build - run: name: Compress - command: Compress-Archive -LiteralPath ~\project\desktop\build\exe.win-amd64-3.9\* -DestinationPath ~\onionshare-win64.zip + command: | + mv ~\project\desktop\build\exe.win-amd64-3.9\ ~\onionshare-win64 + Compress-Archive -LiteralPath ~\onionshare-win64 -DestinationPath ~\onionshare-win64.zip - store_artifacts: path: ~\onionshare-win64.zip @@ -116,7 +117,6 @@ jobs: executor: name: win/default shell: powershell.exe - steps: - checkout - run: @@ -155,6 +155,29 @@ jobs: C:\Python-32bit\Scripts\poetry run python .\package\windows.py cleanup-build - run: name: Compress - command: Compress-Archive -LiteralPath ~\project\desktop\build\exe.win32-3.9\* -DestinationPath ~\onionshare-win32.zip + command: | + mv ~\project\desktop\build\exe.win32-3.9\ ~\onionshare-win32 + Compress-Archive -LiteralPath ~\onionshare-win32 -DestinationPath ~\onionshare-win32.zip - store_artifacts: path: ~\onionshare-win32.zip + + build-macos: + macos: + xcode: 12.5.1 + steps: + - checkout + + build-snapcraft: + docker: + - image: ubuntu/20.04 + working_directory: ~/repo + steps: + - checkout + - run: + name: Build the snap + command: | + cd ~/repo + snapcraft + mv onionshare-*_amd64.snap onionshare_amd64.snap + - store_artifacts: + path: ~/repo/onionshare_amd64.snap