From 6a77e7d099b5895d153894465ce9a420a889ad4e Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Wed, 3 Jan 2024 15:15:18 +1300 Subject: [PATCH] Add io_uring test environment. --- .github/workflows/coverage.yaml | 3 -- .github/workflows/test-io_uring.yaml | 47 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/test-io_uring.yaml diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 78d482ac..521eb892 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -32,9 +32,6 @@ jobs: ruby-version: ${{matrix.ruby}} bundler-cache: true - - name: Backends - run: bundle exec ruby -r"io/event" -e "puts IO::Event::Selector.constants" - - name: Run tests timeout-minutes: 5 run: bundle exec bake test diff --git a/.github/workflows/test-io_uring.yaml b/.github/workflows/test-io_uring.yaml new file mode 100644 index 00000000..66d46689 --- /dev/null +++ b/.github/workflows/test-io_uring.yaml @@ -0,0 +1,47 @@ +name: Test + +on: [push, pull_request] + +permissions: + contents: read + +env: + CONSOLE_OUTPUT: XTerm + IO_EVENT_SELECTOR: URing + +jobs: + test: + name: ${{matrix.ruby}} on ${{matrix.os}} / IO_EVENT_SELECTOR=Select + runs-on: ${{matrix.os}}-latest + + strategy: + matrix: + os: + - ubuntu + + ruby: + - "3.3" + + steps: + - uses: actions/checkout@v3 + + - name: Install packages (Ubuntu) + if: matrix.os == 'ubuntu' + run: sudo apt-get install -y liburing-dev + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{matrix.ruby}} + bundler-cache: true + cache-version: io_uring + + - name: Backends + run: bundle exec ruby -r"io/event" -e "puts IO::Event::Selector.constants" + + - name: Run tests + timeout-minutes: 10 + run: bundle exec bake test + + - name: Run external tests + timeout-minutes: 10 + run: bundle exec bake test:external