name: Build on: push: branches: - main pull_request: branches: - main jobs: linux: name: Linux runs-on: ubuntu-latest strategy: matrix: ruby: ['2.5.x', '2.6.x', '2.7.x', '3.0.x'] steps: - uses: actions/checkout@v1 - name: Cache gems uses: actions/cache@v1 with: path: vendor/bundle key: gems-v1-${{ runner.os }}-${{ hashFiles('**/Gemfile') }}-${{ hashFiles('**/*.gemspec') }}- restore-keys: | gems-v1-${{ runner.os }}-${{ hashFiles('**/Gemfile') }}-${{ hashFiles('**/*.gemspec') }}- gems-v1-${{ runner.os }}-${{ hashFiles('**/Gemfile') }}- gems-v1-${{ runner.os }}- - uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - run: sudo apt-get update; sudo apt-get install cmake xorg-dev libgl1-mesa-dev - run: bash install-glfw.sh - run: gem install bundler - run: bundle install --path vendor/bundle - name: Test & publish code coverage uses: paambaati/codeclimate-action@v2.2.1 if: github.event_name == 'push' env: CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} with: coverageCommand: bundle exec rake test - name: Test if: github.event_name != 'push' run: bundle exec rake test macos: name: macOS runs-on: macos-latest strategy: matrix: ruby: ['2.5.x', '2.6.x', '2.7.x', '3.0.x'] steps: - uses: actions/checkout@v1 - name: Cache gems uses: actions/cache@v1 with: path: vendor/bundle key: gems-v1-${{ runner.os }}-${{ hashFiles('**/Gemfile') }}-${{ hashFiles('**/*.gemspec') }}- restore-keys: | gems-v1-${{ runner.os }}-${{ hashFiles('**/Gemfile') }}-${{ hashFiles('**/*.gemspec') }}- gems-v1-${{ runner.os }}-${{ hashFiles('**/Gemfile') }}- gems-v1-${{ runner.os }}- - uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - run: brew install glfw - run: bundle install --path vendor/bundle - run: bundle exec rake test windows: name: Windows runs-on: windows-latest env: MITTSU_LIBGLFW_FILE: c:\projects\mittsu\glfw-3.3.1.bin.WIN32\lib-mingw\glfw3.dll strategy: matrix: ruby: ['2.5.x', '2.6.x', '2.7.x', '3.0.x'] steps: - uses: actions/checkout@v1 - name: Cache gems uses: actions/cache@v1 with: path: vendor/bundle key: gems-v1-${{ runner.os }}-${{ hashFiles('**/Gemfile') }}-${{ hashFiles('**/*.gemspec') }}- restore-keys: | gems-v1-${{ runner.os }}-${{ hashFiles('**/Gemfile') }}-${{ hashFiles('**/*.gemspec') }}- gems-v1-${{ runner.os }}-${{ hashFiles('**/Gemfile') }}- gems-v1-${{ runner.os }}- - uses: actions/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - run: .\install-glfw.ps1 - run: gem install bundler - run: bundle install --path vendor/bundle - run: bundle exec rake test