From 6c3bb2b1dd7d2e75b5f4ee11377b5482b5d7d7a1 Mon Sep 17 00:00:00 2001 From: marek-karwacki-rdx <118768577+marek-karwacki-rdx@users.noreply.github.com> Date: Thu, 14 Dec 2023 09:37:55 +0100 Subject: [PATCH 1/4] Create CODEOWNERS --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..673c699f4 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @RDXWorks-actions/devops From 4a75ba435fb68caacdb1b36b96da6ad02edc467d Mon Sep 17 00:00:00 2001 From: marek-karwacki-rdx <118768577+marek-karwacki-rdx@users.noreply.github.com> Date: Thu, 14 Dec 2023 09:39:33 +0100 Subject: [PATCH 2/4] Create fork-sync.yml --- .github/workflows/fork-sync.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/fork-sync.yml diff --git a/.github/workflows/fork-sync.yml b/.github/workflows/fork-sync.yml new file mode 100644 index 000000000..c6ae33557 --- /dev/null +++ b/.github/workflows/fork-sync.yml @@ -0,0 +1,20 @@ +name: Sync Fork + +on: + schedule: + - cron: '0 1 * * *' + workflow_dispatch: + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - uses: tgymnich/fork-sync@v1.8 + with: + owner: ruby + base: master + head: master + auto_merge: false + retries: 2 + retry_after: 10 + ignore_fail: true From bd6e534ac7a59533b286b0c27dcd9fc4e9bf6ff3 Mon Sep 17 00:00:00 2001 From: Marek Karwacki Date: Tue, 2 Jan 2024 09:34:49 +0100 Subject: [PATCH 3/4] Remove forked github workflows --- .github/FUNDING.yml | 1 - .github/ISSUE_TEMPLATE/bug_report.yml | 43 --- .github/ISSUE_TEMPLATE/config.yml | 1 - .../ISSUE_TEMPLATE/other-issue--not-a-bug-.md | 10 - .github/workflows/release.yml | 17 - .github/workflows/test.yml | 334 ------------------ 6 files changed, 406 deletions(-) delete mode 100644 .github/FUNDING.yml delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.yml delete mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/ISSUE_TEMPLATE/other-issue--not-a-bug-.md delete mode 100644 .github/workflows/release.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 646a459ff..000000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: [eregon] diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml deleted file mode 100644 index e6fdbf831..000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Bug report -description: Create a report to help us improve -body: -- type: markdown - attributes: - value: | - First, take some time to think whether this is really an issue of ruby/setup-ruby and whether it is fixable in this action. - This action basically just downloads a prebuilt Ruby and adds it to `PATH`, so it is unlikely the bug is in this action. - Give some thoughts whether it could be an issue in your workflow, in the gems you use, in GitHub Actions, in Ruby, RubyGems, Bundler, etc. - This is NOT the place to ask help about your workflow failing (ask that on [GitHub Community](https://github.com/orgs/community/discussions/categories/actions) or [Discussions](https://github.com/ruby/setup-ruby/discussions) instead), it is only to report issues about ruby/setup-ruby. - Please note we will close your issue without comment if you do not fill out the requested information. -- type: checkboxes - attributes: - label: Ensure the following before filing this issue - options: - - label: | - I verified it reproduces with the latest version with `- uses: ruby/setup-ruby@v1` (see [Versioning policy](https://github.com/ruby/setup-ruby/blob/master/README.md#versioning)) - required: true - - label: | - I tried to reproduce the issue locally by following the workflow steps (including all commands done by `ruby/setup-ruby`, except for `Downloading Ruby` & `Extracting Ruby`), - and it did not reproduce locally (if it does reproduce locally, it's not a ruby/setup-ruby issue) - required: true - # - label: | - # If the issue happens on JRuby or TruffleRuby, and does not happen on CRuby (please check), file an issue there instead. It's very unlikely ruby/setup-ruby is the cause. - # required: true -- type: dropdown - attributes: - label: Are you running on a GitHub-hosted runner or a self-hosted runner? - options: - - GitHub-hosted runner - - self-hosted runner - validations: - required: true -- type: input - attributes: - label: Link to the failed workflow job (must be a public workflow job, so the necessary information is available) - validations: - required: true -- type: textarea - attributes: - label: Any other notes? - validations: - required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 3ba13e0ce..000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1 +0,0 @@ -blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/other-issue--not-a-bug-.md b/.github/ISSUE_TEMPLATE/other-issue--not-a-bug-.md deleted file mode 100644 index 715cca28f..000000000 --- a/.github/ISSUE_TEMPLATE/other-issue--not-a-bug-.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: Other issue (not a bug) -about: Feature requests, etc -title: '' -labels: '' -assignees: '' - ---- - - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 8c5de1e67..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: Update the v1 branch when a release is published -on: - release: - types: [published] -permissions: - contents: read - -jobs: - release: - runs-on: ubuntu-latest - permissions: - contents: write # for git push - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - run: git push origin HEAD:v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index baa6c0578..000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,334 +0,0 @@ -name: Test this action -on: - pull_request: - push: - branches-ignore: - - v1 - tags-ignore: - - '*' - paths-ignore: - - README.md - workflow_dispatch: -permissions: - contents: read - -jobs: - test: - strategy: - fail-fast: false - matrix: - os: [ ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, macos-13, macos-arm-oss, windows-2019, windows-2022 ] - ruby: [ - '1.9', '2.0', '2.1', '2.2', '2.3', '2.4', '2.5', '2.6', '2.7', '3.0', '3.1', '3.2', '3.3', ruby-head, - jruby, jruby-head, - truffleruby, truffleruby-head, - truffleruby+graalvm, truffleruby+graalvm-head - ] - include: - - { os: windows-2019, ruby: mingw } - - { os: windows-2019, ruby: mswin } - - { os: windows-2022, ruby: mingw } - - { os: windows-2022, ruby: mswin } - - { os: windows-2022, ruby: ucrt } - exclude: - # https://github.com/ruby/setup-ruby/issues/496 - - { os: ubuntu-22.04, ruby: '2.2' } - # Too old, fails to compile on macos-arm-oss - - { os: macos-arm-oss, ruby: '1.9' } - - { os: macos-arm-oss, ruby: '2.0' } - - { os: macos-arm-oss, ruby: '2.1' } - - { os: macos-arm-oss, ruby: '2.2' } - - { os: macos-arm-oss, ruby: '2.3' } - - { os: macos-arm-oss, ruby: '2.4' } - - { os: macos-arm-oss, ruby: '2.5' } - # Windows - - { os: windows-2019, ruby: '1.9' } - - { os: windows-2019, ruby: '3.3' } - - { os: windows-2019, ruby: debug } - - { os: windows-2019, ruby: truffleruby } - - { os: windows-2019, ruby: truffleruby-head } - - { os: windows-2019, ruby: truffleruby+graalvm } - - { os: windows-2019, ruby: truffleruby+graalvm-head } - - { os: windows-2022, ruby: '1.9' } - - { os: windows-2022, ruby: '3.3' } - - { os: windows-2022, ruby: debug } - - { os: windows-2022, ruby: truffleruby } - - { os: windows-2022, ruby: truffleruby-head } - - { os: windows-2022, ruby: truffleruby+graalvm } - - { os: windows-2022, ruby: truffleruby+graalvm-head } - - name: ${{ matrix.os }} ${{ matrix.ruby }} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v4 - - - uses: ./ - with: - ruby-version: ${{ matrix.ruby }} - bundler-cache: true - - run: ruby -v - - name: PATH - shell: pwsh - run: | - # Show PATH with Powershell - $f, $r = $env:PATH.split([IO.Path]::PathSeparator); $r - - - name: build compiler - run: | - ruby -e "puts 'build compiler: ' + RbConfig::CONFIG.fetch('CC_VERSION_MESSAGE', 'unknown').lines.first" - - name: gcc and ridk version (mingw) - if: startsWith(matrix.os, 'windows') - run: | - $abi, $plat = $(ruby -e "STDOUT.write RbConfig::CONFIG['ruby_version'] + ' ' + RUBY_PLATFORM").split(' ') - if ($plat.Contains('mingw')) { - gcc --version - if ($abi -ge '2.4') { - ridk version - } else { - echo 'ridk is unavailable' - } - } elseif ($plat.Contains('mswin')) { - &"$env:VCPKG_INSTALLATION_ROOT\vcpkg" list - } - - name: RbConfig::CONFIG - run: ruby -rrbconfig -rpp -e 'pp RbConfig::CONFIG' - - name: RbConfig::MAKEFILE_CONFIG - run: ruby -rrbconfig -rpp -e 'pp RbConfig::MAKEFILE_CONFIG' - - - name: Subprocess test - run: ruby test_subprocess.rb - - name: OpenSSL compiled version - run: ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION' - - name: OpenSSL loaded version - run: ruby -ropenssl -e 'puts OpenSSL::OPENSSL_LIBRARY_VERSION' - if: matrix.ruby != '1.9' - - name: OpenSSL test - run: ruby -ropen-uri -e 'puts URI.send(:open, %{https://rubygems.org/}) { |f| f.read(1024) }' - - - run: gem env - - name: C extension test - run: gem install json -v 2.2.0 - - run: bundle --version - # This step is redundant with `bundler-cache: true` but is there to check a redundant `bundle install` still works - - run: bundle install - - run: bundle exec rake --version - - run: bundle exec rake - - # Ensure the same bundle commands work in bash on Windows - - name: bundle install (bash) - run: bundle install - shell: bash - if: startsWith(matrix.os, 'windows') - - name: bundle exec rake --version (bash) - run: bundle exec rake --version - shell: bash - if: startsWith(matrix.os, 'windows') - - name: bundle exec rake (bash) - run: bundle exec rake - shell: bash - if: startsWith(matrix.os, 'windows') - - - name: Test `gem github:` in a Gemfile - run: bundle install - env: - BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/gem_from_github.gemfile - - - name: which ruby, bundle - shell: bash - run: which -a ruby bundle - - name: which rake - run: which -a rake - if: "!startsWith(matrix.os, 'windows')" - - name: where ruby, rake, bundle - if: startsWith(matrix.os, 'windows') - run: | - $ErrorActionPreference = 'Continue' - $where = 'ruby', 'rake', 'bundle' - foreach ($e in $where) { - $rslt = where.exe $e 2>&1 | Out-String - if ($rslt.contains($e)) { echo $rslt.Trim() } - else { echo "Can't find $e" } - echo '' - } - - name: bash test - shell: bash - run: echo ~ && bundle install - - name: Windows JRuby - if: startsWith(matrix.os, 'windows') && startsWith(matrix.ruby, 'jruby') - run: gem install sassc - - testNoGemfile: - name: "Test with no Gemfile" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - run: rm Gemfile - - uses: ./ - with: - ruby-version: '2.6' - - run: ruby -v - - testLatestRubygemsVersion: - name: "Test rubygems: latest upgrades the default RubyGems version" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./ - with: - ruby-version: '2.6' - rubygems: latest - - run: ruby -e "exit(Gem.rubygems_version > Gem::Version.new('3.0.3'))" - - testFixedRubygemsVersionUpgrades: - name: "Test rubygems: version upgrades RubyGems to that version if the default is older" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./ - with: - ruby-version: '2.6' - rubygems: 3.2.3 - - run: gem --version | grep -F "3.2.3" - - testFixedRubygemsVersionNoop: - name: "Test rubygems: version noops if the default is newer" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./ - with: - ruby-version: '3.1.0' - rubygems: 3.2.3 - - run: gem --version | grep -F "3.3.3" - - testUseBundlerFromRubyGemsUpdate: - name: "Test rubygems: version uses the Bundler installed by the rubygems update" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./ - with: - ruby-version: '3.1.0' - rubygems: 3.4.0 - - run: gem --version | grep -F "3.4.0" - - run: bundle --version | grep -F "2.4.0" - - testFixedBundlerVersionForOldRuby: - name: "Test bundler: 1.x for old Ruby" - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: ./ - with: - ruby-version: '2.2' - bundler: 1.16.6 - - run: bundle --version | grep -F "1.16.6" # And not 1.17.x from ~> 1 - - testMajorBundlerVersion: - name: "Test with a major Bundler version" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./ - with: - ruby-version: '2.6' - bundler: 2 - - run: bundle --version | grep -P "Bundler version 2\.\d+\.\d+" - - testMinorBundlerVersion: - name: "Test with a minor Bundler version" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./ - with: - ruby-version: '2.6' - bundler: 2.2 - - run: bundle --version | grep -P "Bundler version 2\.2\.\d+" - - testExactBundlerVersion: - name: "Test with an exact Bundler version" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./ - with: - ruby-version: '2.6' - bundler: 2.2.3 - - run: bundle --version | grep -F "Bundler version 2.2.3" - - testBundlerPre: - name: "Test with a Bundler pre/rc version" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: ./ - with: - ruby-version: '2.6' - bundler: 2.2.0.rc.2 - - run: bundle --version | grep -F "Bundler version 2.2.0.rc.2" - - testBundlerDev: - name: "Test BUNDLED WITH Bundler dev" - runs-on: ubuntu-latest - env: - BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/bundler-dev.gemfile - steps: - - uses: actions/checkout@v4 - - uses: ./ - with: - ruby-version: ruby-head - bundler-cache: true - - testDependencyOnBundler1: - name: "Test gemfile depending on Bundler 1" - runs-on: ubuntu-latest - env: - BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/bundler1.gemfile - steps: - - uses: actions/checkout@v4 - - uses: ./ - with: - ruby-version: '2.7' - bundler: 1 - bundler-cache: true - - run: bundle --version | grep -F "Bundler version 1." - - testGemfileMatrix: - strategy: - fail-fast: false - matrix: - gemfile: [ rails5, rails6 ] - name: "Test with ${{ matrix.gemfile }} gemfile" - runs-on: ubuntu-latest - env: - BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile - steps: - - uses: actions/checkout@v4 - - uses: ./ - with: - ruby-version: '2.6' - bundler-cache: true - - run: bundle exec rails --version - - testTruffleRubyNokogiri: - name: "Test installing a Gemfile with nokogiri on TruffleRuby" - runs-on: ubuntu-latest - env: - BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/nokogiri.gemfile - steps: - - uses: actions/checkout@v4 - - uses: ./ - with: - ruby-version: truffleruby-head - bundler-cache: true - - run: bundle list | grep nokogiri - - lint: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - run: yarn install - - run: yarn run package - - name: Check generated files are up to date - run: git diff --exit-code From 48b4c52901f7cc735ef4709e6a94511d129a50db Mon Sep 17 00:00:00 2001 From: Marek Karwacki Date: Wed, 10 Jan 2024 10:46:44 +0100 Subject: [PATCH 4/4] Update fork sync interval --- .github/workflows/fork-sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fork-sync.yml b/.github/workflows/fork-sync.yml index c6ae33557..93600ac6b 100644 --- a/.github/workflows/fork-sync.yml +++ b/.github/workflows/fork-sync.yml @@ -2,7 +2,7 @@ name: Sync Fork on: schedule: - - cron: '0 1 * * *' + - cron: '0 1 * * 0' workflow_dispatch: jobs: