Fix compressing Windows builds, add skeleton for making macOS build, and start snapcraft build

This commit is contained in:
Micah Lee 2022-03-31 18:54:32 -07:00
parent f9b79d667f
commit fd052e6f1c
No known key found for this signature in database
GPG Key ID: 403C2657CD994F73

View File

@ -17,17 +17,22 @@ workflows:
requires: requires:
- test-cli - test-cli
# - test-gui # - test-gui
- build-macos:
requires:
- test-cli
# - test-gui
- build-snapcraft:
requires:
- test-cli
# - test-gui
jobs: jobs:
test-cli: test-cli:
docker: docker:
- image: cimg/python:3.9 - image: cimg/python:3.9
working_directory: ~/repo working_directory: ~/repo
steps: steps:
- checkout - checkout
- run: - run:
name: Install dependencies name: Install dependencies
command: | command: |
@ -36,7 +41,6 @@ jobs:
pip install poetry pip install poetry
cd ~/repo/cli cd ~/repo/cli
poetry install poetry install
- run: - run:
name: Run tests name: Run tests
command: | command: |
@ -50,12 +54,9 @@ jobs:
test-gui: test-gui:
docker: docker:
- image: cimg/python:3.9 - image: cimg/python:3.9
working_directory: ~/repo working_directory: ~/repo
steps: steps:
- checkout - checkout
- run: - run:
name: Install dependencies name: Install dependencies
command: | 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 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 cd ~/repo/desktop
poetry install poetry install
- run: - run:
name: Run tests name: Run tests
command: | command: |
@ -75,7 +75,6 @@ jobs:
executor: executor:
name: win/default name: win/default
shell: powershell.exe shell: powershell.exe
steps: steps:
- checkout - checkout
- run: - run:
@ -108,7 +107,9 @@ jobs:
poetry run python .\package\windows.py cleanup-build poetry run python .\package\windows.py cleanup-build
- run: - run:
name: Compress 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: - store_artifacts:
path: ~\onionshare-win64.zip path: ~\onionshare-win64.zip
@ -116,7 +117,6 @@ jobs:
executor: executor:
name: win/default name: win/default
shell: powershell.exe shell: powershell.exe
steps: steps:
- checkout - checkout
- run: - run:
@ -155,6 +155,29 @@ jobs:
C:\Python-32bit\Scripts\poetry run python .\package\windows.py cleanup-build C:\Python-32bit\Scripts\poetry run python .\package\windows.py cleanup-build
- run: - run:
name: Compress 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: - store_artifacts:
path: ~\onionshare-win32.zip 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