Skip to content

ci: Rename workflow for clarity #566

ci: Rename workflow for clarity

ci: Rename workflow for clarity #566

Workflow file for this run

name: CI
on:
push:
branches:
- scip-ruby/master
pull_request:
branches:
- scip-ruby/master
jobs:
test:
runs-on: 'ubuntu-20.04'
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
# Keep in sync with release.yml
- name: Manually evict cache entry if applicable
run: ACCESS_TOKEN='${{ secrets.GITHUB_TOKEN }}' python3 .github/workflows/evict.py
- name: "πŸš€ Mount Bazel build cache"
uses: actions/cache@v3
with:
path: ~/bazelcache/build
key: bazel-build-${{ runner.os }}-${{ github.sha }}
restore-keys: |
bazel-build-${{ runner.os }}-
bazel-build-
- name: "πŸš€ Mount Bazel repo cache"
uses: actions/cache@v3
with:
path: ~/bazelcache/repos
key: bazel-repos-${{ runner.os }}-${{ hashFiles('WORKSPACE') }}
restore-keys: |
bazel-repos-${{ runner.os }}-
bazel-repos-
- name: "βš™οΈ Setup Bazel"
run: .github/workflows/setup-bazel.sh
- name: "πŸ— Build"
run: ./bazel build //main:scip-ruby //test:scip_test_runner --config=dbg --execution_log_binary_file=log
- name: "πŸͺ΅ Upload log"
uses: actions/upload-artifact@v3
with:
name: ci-build-log
path: log
- name: "πŸ‹οΈβ€β™‚οΈ Run tests"
run: ./bazel test //test/scip --config=dbg
# Repo tests are kinda' broken right now because the bundle cache step needs synchronization
#
# - name: "πŸ‹οΈβ€β™‚οΈ Build repo tests"
# continue-on-error: true
# run: |
# sudo apt-get install --reinstall build-essential
# ls "$(dirname "$(command -v gcc)")"
# echo "$PATH"
# ls /usr/bin /usr/local/bin /bin
# # Technically, this is for Ruby 2.7.0 but it's probably fine.
# sudo apt-get install ruby2.7-dev
# ./bazel test //test/scip/repos --test_env GITHUB_ACTIONS=1 --test_env GEM_PATH="$(dirname "$(command -v gem)")" --config=dbg
#
# Blocked on a bundler bug in 2.3.4. I get a crash trace like this when running locally.
#
# NoMethodError: undefined method `metadata' for nil:NilClass
# /Users/varun/Code/scip-ruby/.cache_ruby/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/cli/common.rb:22:in `block in output_fund_metadata_summary'
# /Users/varun/Code/scip-ruby/.cache_ruby/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/cli/common.rb:22:in `count'
# /Users/varun/Code/scip-ruby/.cache_ruby/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/cli/common.rb:22:in `output_fund_metadata_summary'
# /Users/varun/Code/scip-ruby/.cache_ruby/versions/2.7.2/lib/ruby/gems/2.7.0/gems/bundler-2.3.4/lib/bundler/cli/install.rb:87:in `run'
#
# This is the method in question:
#
# def self.output_fund_metadata_summary
# definition = Bundler.definition
# current_dependencies = definition.requested_dependencies
# current_specs = definition.specs
#
# count = current_dependencies.count {|dep| current_specs[dep.name].first.metadata.key?("funding_uri") }
# ^ boom!
# We should probably file a bug against bundler but I haven't been able to repro
# the issue outside of a Bazel sandbox yet.