Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: enable prerelease windows build testing #179

Merged
merged 25 commits into from
Feb 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .github/actions/test-system-rclip/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ inputs:
description: 'Python version to use'
required: false
default: '3.10'
force-bash:
description: 'Force using bash instead of PowerShell on Windows'
required: false
default: false

runs:
using: 'composite'
Expand All @@ -21,13 +25,14 @@ runs:
python -m pip install --upgrade pip
pip install --upgrade poetry
poetry install --no-root --only dev
# here and below, passing `-ieo pipefail` to the shell to ensure it reads `.bashrc`
shell: bash -ieo pipefail {0}
# here and below, on Windows, we set the latest PATH to ensure that the
# action can find system rclip
# on other OSes, we pass -ieo pipefail to bash to ensure it reads the .bashrc
shell: ${{ (runner.os != 'Windows' || inputs.force-bash == 'true') && 'bash -ieo pipefail {0}' || 'powershell -NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command "$env:Path = [Environment]::GetEnvironmentVariable(''Path'', ''Machine'') + '';'' + [Environment]::GetEnvironmentVariable(''Path'', ''User''); & {0}"' }}
- name: Print tested rclip version
run: |
which rclip
ls -lah $(which rclip)
rclip --version
shell: bash -ieo pipefail {0}
shell: ${{ (runner.os != 'Windows' || inputs.force-bash == 'true') && 'bash -ieo pipefail {0}' || 'powershell -NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command "$env:Path = [Environment]::GetEnvironmentVariable(''Path'', ''Machine'') + '';'' + [Environment]::GetEnvironmentVariable(''Path'', ''User''); & {0}"' }}
- run: make test-system-rclip
shell: bash -ieo pipefail {0}
shell: ${{ (runner.os != 'Windows' || inputs.force-bash == 'true') && 'bash -ieo pipefail {0}' || 'powershell -NoLogo -NonInteractive -ExecutionPolicy RemoteSigned -Command "$env:Path = [Environment]::GetEnvironmentVariable(''Path'', ''Machine'') + '';'' + [Environment]::GetEnvironmentVariable(''Path'', ''User''); & {0}"' }}
16 changes: 7 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
- uses: ./.github/actions/test-system-rclip
with:
python: ${{ matrix.python }}
force-bash: true

pypi-release:
needs: pypi-test
Expand Down Expand Up @@ -179,7 +180,7 @@ jobs:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_LOGIN }}

appimage-build:
needs: parse_tag
needs: [lint, parse_tag]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -221,8 +222,8 @@ jobs:
sudo mv rclip-*.AppImage /usr/local/bin/rclip
- uses: ./.github/actions/test-system-rclip

windows:
needs: [pypi-test, parse_tag]
windows-build:
needs: [lint, parse_tag]
if: needs.parse_tag.outputs.is_stable_version == 'true'
runs-on: windows-2022
steps:
Expand Down Expand Up @@ -260,19 +261,16 @@ jobs:
if-no-files-found: error

windows-test:
needs: [parse_tag, windows]
needs: [parse_tag, windows-build]
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: windows
- name: Install MSI
run: Start-Process msiexec.exe -Wait -ArgumentList '/i rclip-${{ needs.parse_tag.outputs.version }}.msi /quiet'
- name: Ensure it works
run: |
Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1"
refreshenv
rclip cat
- uses: ./.github/actions/test-system-rclip

create_release:
needs: [parse_tag, pypi-release, snap-release, appimage-test, windows-test]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "rclip"
version = "1.11.1a49"
version = "1.11.1a62"
description = "AI-Powered Command-Line Photo Search Tool"
authors = ["Yurij Mikhalevich <[email protected]>"]
license = "MIT"
Expand Down
4 changes: 2 additions & 2 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: |
For a detailed demonstration, watch the video: https://www.youtube.com/watch?v=tAJHXOkHidw.

You can use another image as a query by passing a file path or even an URL to the image file to **rclip** and combine multiple queries. Check out the project's README on GitHub for more usage examples: https://github.com/yurijmikhalevich/rclip#readme.
version: 1.11.1a49
version: 1.11.1a62
website: https://github.com/yurijmikhalevich/rclip
contact: [email protected]
passthrough:
Expand All @@ -28,7 +28,7 @@ apps:
parts:
rclip:
plugin: python
source: ./snap/local/rclip-1.11.1a49.tar.gz
source: ./snap/local/rclip-1.11.1a62.tar.gz
build-packages:
- python3-pip
build-environment:
Expand Down
Loading