.github/workflows/test_on_macos.yml in duckdb-0.2.8.0 vs .github/workflows/test_on_macos.yml in duckdb-0.2.9.0

- old
+ new

@@ -5,22 +5,46 @@ jobs: build: runs-on: macos-latest strategy: matrix: - ruby: ['2.5.8', '2.6.8', '2.7.4', '3.0.2', 'head'] + ruby: ['2.6.8', '2.7.4', '3.0.2', 'head'] + duckdb: ['0.2.8', '0.2.9'] steps: - uses: actions/checkout@v2 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - - name: Install latest duckdb by brew + - name: duckdb cache + id: duckdb-cache + uses: actions/cache@v2 + with: + path: /usr/local/Cellar/duckdb@${{ matrix.duckdb }} + key: ${{ runner.os }}-duckdb-v${{ matrix.duckdb }} + + - name: Install duckdb v${{ matrix.duckdb }} by brew + env: + DUCKDB_VERSION: ${{ matrix.duckdb }} + if: steps.duckdb-cache.outputs.cache-hit != 'true' run: | - brew install duckdb + brew tap-new duckdb/taps + brew extract duckdb duckdb/taps --version $DUCKDB_VERSION + brew install duckdb/taps/duckdb@$DUCKDB_VERSION + + - name: setup duckdb v${{ matrix.duckdb }} headers and libraries + env: + DUCKDB_VERSION: ${{ matrix.duckdb }} + run: | + if [ ! -L /usr/local/include/duckdb.h ]; then + header=`find /usr/local/Cellar/duckdb@$DUCKDB_VERSION -name "duckdb.h"` + lib=`find /usr/local/Cellar/duckdb@$DUCKDB_VERSION -name "libduckdb.dylib"` + ln -s $header /usr/local/include/duckdb.h + ln -s $lib /usr/local/lib/libduckdb.dylib + fi - name: Build and test with Rake with Ruby ${{ matrix.ruby }} run: | ruby -v bundle install --jobs 4 --retry 3