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

test: Run test against openslide 3 & 4 #57

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
toolchain: ${{ env.RUST_VERSION }}
components: clippy, rustfmt
- name: Install dependencies
run: make install-deps-ubuntu
run: make install-deps-ubuntu-openslide3
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
15 changes: 9 additions & 6 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "ubuntu-20.04", "macos-12" ]
os: [ "ubuntu-22.04", "macos-12" ]
openslide_version: [ "openslide3", "openslide4" ]

env:
SYSTEM: ${{ contains(matrix.os, 'ubuntu') && 'ubuntu' || 'macos' }}
INSTALL_DEPS_CMD: install-deps-${{ contains(matrix.os, 'ubuntu') && 'ubuntu' || 'macos' }}-${{ matrix.openslide_version }}
TEST_DEBUG_CMD: test-debug-${{ contains(matrix.os, 'ubuntu') && 'ubuntu' || 'macos' }}
TEST_RELEASE_CMD: test-release-${{ contains(matrix.os, 'ubuntu') && 'ubuntu' || 'macos' }}

steps:
- uses: actions/checkout@v4
Expand All @@ -33,11 +36,11 @@ jobs:
with:
key: ${{ matrix.os }}
- name: Install dependencies
run: make install-deps-${{ env.SYSTEM }}
run: make ${{ env.INSTALL_DEPS_CMD }}
- name: Build & Test (Debug)
run: make test-debug-${{ env.SYSTEM }}
run: make ${{ env.TEST_DEBUG_CMD }}
- name: Build & Test (Release)
run: make test-release-${{ env.SYSTEM }}
run: make ${{ env.TEST_RELEASE_CMD }}

doc-rs:
runs-on: ubuntu-22.04
Expand All @@ -48,7 +51,7 @@ jobs:
toolchain: ${{ env.RUST_VERSION }}
components: clippy, rustfmt
- name: Install dependencies ubuntu
run: make install-deps-ubuntu
run: make install-deps-ubuntu-openslide3
- name: Generate Doc
env:
DOCS_RS: 1
Expand Down
22 changes: 17 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
.PHONY: install-deps-brew install-deps-apt
.PHONY: install-deps-macos-openslide3 install-deps-macos-openslide4 install-deps-ubuntu-openslide3 install-deps-ubuntu-openslide4

install-deps-macos:
brew install openslide
install-deps-macos-openslide3:
curl https://raw.githubusercontent.com/Homebrew/homebrew-core/e6e41a54ec4d05000c1b95e515c85adb6f8f35af/Formula/o/openslide.rb > openslide.rb
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install openslide.rb

install-deps-ubuntu:
install-deps-macos-openslide4:
curl https://raw.githubusercontent.com/Homebrew/homebrew-core/f92e0a24754ed265ff7a032b89b336dd612e5559/Formula/o/openslide.rb > openslide.rb
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install openslide.rb

install-deps-ubuntu-openslide3:
sudo apt-get update
sudo apt-get install -y --no-install-recommends libopenslide-dev=3.*

install-deps-ubuntu-openslide4:
sudo apt-get update
sudo apt install -y --no-install-recommends software-properties-common gnupg
sudo add-apt-repository -y ppa:openslide/openslide
sudo apt-get update
sudo apt-get install -y --no-install-recommends libopenslide-dev
sudo apt install -y --no-install-recommends libopenslide-dev=4.* libdicom-dev=1.* libwebp-dev=1.*

test-debug-ubuntu:
cargo test
Expand Down