From 8dbf4f9ce7271f66d38cd15a0e0941ce18ccea82 Mon Sep 17 00:00:00 2001 From: westonplatter Date: Sun, 5 Mar 2023 14:44:44 -0700 Subject: [PATCH 1/5] create mac ci --- .github/workflows/ci.yml | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40ce024..a6611a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,9 +5,10 @@ on: branches: [ '*' ] jobs: - test: - runs-on: ubuntu-latest + ci_ubuntu: + runs-on: ubuntu-22.04 # currently ubuntu-latest strategy: + fail-fast: false matrix: ruby-version: [3.2, 3.1, 3.0, 2.7, 2.6, 2.5] steps: @@ -18,9 +19,22 @@ jobs: ruby-version: ${{ matrix.ruby-version }} - name: Install xmllint run: sudo apt-get install -y libpng-dev libjpeg-dev - - name: Install dependencies - run: bundle install - - name: Compile - run: bundle exec rake compile - - name: Run tests - run: bundle exec rake \ No newline at end of file + - run: bundle install + - run: bundle exec rake compile + - run: bundle exec rake + + ci_mac: + runs-on: macos-latest + strategy: + fail-fast: false + matrix: + ruby-version: [3.2, 3.1, 3.0, 2.7] + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby ${{ matrix.ruby-version }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + - run: bundle install + - run: bundle exec rake compile + - run: bundle exec rake \ No newline at end of file From 3d635e09b5192da248223b7286c4b219ee1bad44 Mon Sep 17 00:00:00 2001 From: westonplatter Date: Sun, 5 Mar 2023 14:49:53 -0700 Subject: [PATCH 2/5] ci: mac add sqlite --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6611a1..37133ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} + - run: brew install sqlite - run: bundle install - run: bundle exec rake compile - run: bundle exec rake \ No newline at end of file From b236e65dde0e0a30e6cfe814d2cf200fe19fb0d9 Mon Sep 17 00:00:00 2001 From: westonplatter Date: Sun, 5 Mar 2023 14:53:07 -0700 Subject: [PATCH 3/5] ci: fix indentation issue. --- test/test_phashion.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_phashion.rb b/test/test_phashion.rb index 7df60cc..0be58ff 100644 --- a/test/test_phashion.rb +++ b/test/test_phashion.rb @@ -149,7 +149,7 @@ def test_duplicate_with_custom_distance_threshold assert(jpg.duplicate?(jpg_x, threshold: 2)) end - def test_duplicate_meta_methods + def test_duplicate_meta_methods # note: this test depends on the smaller_jpg test still asserting a distance of 2 # note-2: threshold is a :less-than-or-equal-to comparison, which is a change from version 1.0.8 jpg = Phashion::Image.new(File.dirname(__FILE__) + '/jpg/Broccoli_Super_Food.jpg') From ba768fa4320e6101e6a137d38026b2e91096b10d Mon Sep 17 00:00:00 2001 From: westonplatter Date: Sun, 5 Mar 2023 14:57:20 -0700 Subject: [PATCH 4/5] ci: fix, install version 3 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 37133ef..3eff524 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} - - run: brew install sqlite + - run: brew install sqlite3 - run: bundle install - run: bundle exec rake compile - run: bundle exec rake \ No newline at end of file From f406238452114500572c6c724c95262048d6b335 Mon Sep 17 00:00:00 2001 From: westonplatter Date: Sun, 5 Mar 2023 14:58:03 -0700 Subject: [PATCH 5/5] ci: install other README defined dependencies --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3eff524..a92724e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} - - run: brew install sqlite3 + - run: brew install libjpeg libpng sqlite3 - run: bundle install - run: bundle exec rake compile - run: bundle exec rake \ No newline at end of file