From d84309ed71067d6638d63eac70130ba6895b4200 Mon Sep 17 00:00:00 2001 From: Ian Ker-Seymer Date: Fri, 30 Jun 2023 01:12:07 -0400 Subject: [PATCH] Add CI step --- .github/workflows/main.yml | 164 ++++++++++++++++++++----------------- 1 file changed, 89 insertions(+), 75 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e83781fff4..7736758b8c6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,107 +15,121 @@ jobs: strategy: fail-fast: false matrix: - os: [ ubuntu-latest, macos-latest, windows-latest ] + os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: head - bundler-cache: true - - name: Lint config.yml - run: bundle exec rake lint - shell: bash - - name: Run Ruby tests - run: bundle exec rake - shell: bash + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: head + bundler-cache: true + - name: Lint config.yml + run: bundle exec rake lint + shell: bash + - name: Run Ruby tests + run: bundle exec rake + shell: bash build-debug-mode: strategy: fail-fast: false matrix: - os: [ ubuntu-latest, macos-latest, windows-latest ] + os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: head - bundler-cache: true - - name: Run Ruby tests - run: bundle exec rake - env: - YARP_DEBUG_MODE_BUILD: "1" + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: head + bundler-cache: true + - name: Run Ruby tests + run: bundle exec rake + env: + YARP_DEBUG_MODE_BUILD: "1" build-without-assertions: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: head - bundler-cache: true - - name: Run Ruby tests - run: bundle exec rake compile_no_debug + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: head + bundler-cache: true + - name: Run Ruby tests + run: bundle exec rake compile_no_debug lex-ruby: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: head - bundler-cache: true - - name: Lex ruby/ruby - run: bundle exec rake lex:ruby + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: head + bundler-cache: true + - name: Lex ruby/ruby + run: bundle exec rake lex:ruby lex-discourse: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: head - bundler-cache: true - - name: Lex discourse/discourse - run: bundle exec rake lex:discourse + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: head + bundler-cache: true + - name: Lex discourse/discourse + run: bundle exec rake lex:discourse lex-top-100: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: head - bundler-cache: true - - name: Lex Top 100 Gems - run: bundle exec rake lex:topgems - - name: Parse Top 100 Gems - run: bundle exec rake parse:topgems + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: head + bundler-cache: true + - name: Lex Top 100 Gems + run: bundle exec rake lex:topgems + - name: Parse Top 100 Gems + run: bundle exec rake parse:topgems memcheck: runs-on: ubuntu-latest steps: - - name: Install valgrind from source - run: | - sudo apt-get install -y libc6-dbg - wget https://sourceware.org/pub/valgrind/valgrind-3.20.0.tar.bz2 - tar xvf valgrind-3.20.0.tar.bz2 - cd valgrind-3.20.0 - ./configure - make - sudo make install - - uses: actions/checkout@v3 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: head - bundler-cache: true - - name: Run Ruby tests with valgrind - run: bundle exec rake test:valgrind + - name: Install valgrind from source + run: | + sudo apt-get install -y libc6-dbg + wget https://sourceware.org/pub/valgrind/valgrind-3.20.0.tar.bz2 + tar xvf valgrind-3.20.0.tar.bz2 + cd valgrind-3.20.0 + ./configure + make + sudo make install + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: head + bundler-cache: true + - name: Run Ruby tests with valgrind + run: bundle exec rake test:valgrind + + rust: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: head + bundler-cache: true + - name: Run tests + run: bundle exec rake rust:test + - name: Ensure bindings are up to date + run: bundle exec rake rust:bindgen && git diff --exit-code