-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: e2e test latest stable release every day (#172)
Closes #161.
- Loading branch information
1 parent
51649eb
commit b2d0528
Showing
1 changed file
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
name: test-latest-stable-release | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
get_last_release_tag: | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
tag: ${{ steps.extract_tag.outputs.tag }} | ||
steps: | ||
- id: extract_tag | ||
run: | | ||
TAG=$(curl -s https://api.github.com/repos/yurijmikhalevich/rclip/releases/latest | jq -r '.tag_name') | ||
echo "tag=$TAG" >> $GITHUB_OUTPUT | ||
echo "Last release tag: $TAG" | ||
pypi: | ||
needs: get_last_release_tag | ||
strategy: | ||
matrix: | ||
python: ['3.10', '3.11', '3.12'] | ||
# macos-13 is amd64, macos-14 is arm64 | ||
# skipping macos-13 here because newer versions of torch aren't being built for amd64 macOS anymore | ||
os: [ubuntu-22.04, macos-14, windows-2022] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.get_last_release_tag.outputs.tag }} | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- run: pip install --extra-index-url https://download.pytorch.org/whl/cpu --upgrade rclip | ||
if: startsWith(matrix.os, 'ubuntu-') | ||
- run: pip install --upgrade rclip | ||
if: ${{ !startsWith(matrix.os, 'ubuntu-') }} | ||
- uses: ./.github/actions/test-system-rclip | ||
with: | ||
python: ${{ matrix.python }} | ||
force-bash: true | ||
|
||
brew: | ||
needs: get_last_release_tag | ||
strategy: | ||
matrix: | ||
# FIXME: the test fails on linuxbrew because it rclip from linuxbrew | ||
# produces a slightly different output; maybe, because we built pytorch | ||
# slightly differently for linuxbrew | ||
# os: [ubuntu-22.04, macos-13, macos-15] | ||
os: [macos-13, macos-15] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.get_last_release_tag.outputs.tag }} | ||
- name: Install Linuxbrew (only on Ubuntu) | ||
if: startsWith(matrix.os, 'ubuntu-') | ||
run: | | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
echo >> /home/runner/.bashrc | ||
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/runner/.bashrc | ||
- run: brew install yurijmikhalevich/tap/rclip | ||
# overriding shell to ensure it reads `.bashrc` | ||
shell: bash -ieo pipefail {0} | ||
- uses: ./.github/actions/test-system-rclip | ||
|
||
appimage: | ||
needs: get_last_release_tag | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.get_last_release_tag.outputs.tag }} | ||
- run: sudo apt-get install -y fuse | ||
- name: Download & install rclip AppImage | ||
run: | | ||
url=$(curl -s "https://api.github.com/repos/yurijmikhalevich/rclip/releases/latest" \ | ||
| jq -r '.assets[] | select(.name | endswith(".AppImage")).browser_download_url') | ||
wget -O rclip.AppImage "$url" | ||
chmod +x rclip.AppImage | ||
sudo mv rclip.AppImage /usr/local/bin/rclip | ||
- uses: ./.github/actions/test-system-rclip | ||
|
||
snap: | ||
needs: get_last_release_tag | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04, ubuntu-22.04-arm] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.get_last_release_tag.outputs.tag }} | ||
- run: sudo snap install rclip | ||
- uses: ./.github/actions/test-system-rclip | ||
|
||
windows: | ||
needs: get_last_release_tag | ||
runs-on: windows-2022 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ needs.get_last_release_tag.outputs.tag }} | ||
- name: Download & install rclip MSI | ||
run: | | ||
$url = Invoke-RestMethod -Uri "https://api.github.com/repos/yurijmikhalevich/rclip/releases/latest" | ||
$asset = $url.assets | Where-Object { $_.name -like "*.msi" } | Select-Object -First 1 | ||
Invoke-WebRequest -Uri $asset.browser_download_url -OutFile "rclip.msi" | ||
Start-Process msiexec.exe -Wait -ArgumentList "/i rclip.msi /quiet" | ||
- uses: ./.github/actions/test-system-rclip |