From 0758a40614ea5496ae25ddd9fd75f78daedf0bf9 Mon Sep 17 00:00:00 2001 From: Kentaro Hayashi Date: Fri, 27 Dec 2024 17:38:23 +0900 Subject: [PATCH] ci: use /dev/shm if it is available Signed-off-by: Kentaro Hayashi --- .github/workflows/test.yml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 71af8d49d7..3858bc1faa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,13 +19,44 @@ concurrency: permissions: read-all jobs: - test: + linux: runs-on: ${{ matrix.os }} continue-on-error: false strategy: fail-fast: false matrix: - os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] + os: ['ubuntu-latest', 'macos-latest'] + ruby-version: ['3.4', '3.3', '3.2', '3.1'] + exclude: + - os: 'windows-latest' + ruby-version: '3.4' + defaults: + run: + working-directory: /dev/shm + + name: Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }} + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Set up Ruby + uses: ruby/setup-ruby@401c19e14f474b54450cd3905bb8b86e2c8509cf # v1.204.0 + with: + ruby-version: ${{ matrix.ruby-version }} + - name: Install addons + if: ${{ matrix.os == 'ubuntu-latest' }} + run: sudo apt-get install libgmp3-dev libcap-ng-dev + - name: Install dependencies + run: bundle install + - name: Run tests + run: bundle exec rake test TESTOPTS="-v --no-show-detail-immediately" + +jobs: + windows: + runs-on: ${{ matrix.os }} + continue-on-error: false + strategy: + fail-fast: false + matrix: + os: ['macos-latest'] ruby-version: ['3.4', '3.3', '3.2', '3.1'] exclude: - os: 'windows-latest'