Update actions/checkout action to v5 #74
Workflow file for this run
This file contains hidden or 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
| name: CI | |
| on: [push, pull_request] | |
| env: | |
| HOMEBREW_NO_AUTO_UPDATE: 1 | |
| jobs: | |
| test: | |
| name: ${{ matrix.os }} Ruby ${{ matrix.ruby }} | |
| runs-on: ${{ matrix.os }}-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu, macos] | |
| ruby: ["3.4"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler-cache: true | |
| - name: Install macOS dependencies | |
| if: matrix.os == 'macos' | |
| run: brew install llvm libomp autoconf | |
| - name: Setup build environment (macOS) | |
| if: matrix.os == 'macos' | |
| run: | | |
| echo "CC=$(brew --prefix llvm)/bin/clang" >> $GITHUB_ENV | |
| echo "CXX=$(brew --prefix llvm)/bin/clang++" >> $GITHUB_ENV | |
| echo "LDFLAGS=-L/opt/homebrew/lib" >> $GITHUB_ENV | |
| - name: Build jemalloc | |
| run: bundle exec rake jemalloc:build | |
| - name: List jemalloc libraries | |
| run: ls -lh vendor/lib | |
| - name: Build odgi | |
| run: bundle exec rake odgi:build | |
| - name: Compile Ruby extension | |
| run: bundle exec rake compile | |
| - name: Fix macOS library paths | |
| if: matrix.os == 'macos' | |
| run: | | |
| echo "Checking library dependencies..." | |
| otool -L lib/odgi/odgi.bundle | |
| otool -L odgi/lib/libodgi.dylib | |
| echo "Fixing library paths..." | |
| install_name_tool -change "@rpath/libodgi.dylib" "$(pwd)/odgi/lib/libodgi.dylib" lib/odgi/odgi.bundle | |
| echo "Verifying fixed paths..." | |
| otool -L lib/odgi/odgi.bundle | |
| - name: Run tests | |
| run: bundle exec rake test |