feat: add opkg package management support for TurrisOS #186
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: RSpec tests | |
| on: | |
| pull_request: {} | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| env: | |
| BUNDLE_SET: "without packaging documentation release" | |
| jobs: | |
| checks: | |
| name: ${{ matrix.cfg.check }} | |
| strategy: | |
| matrix: | |
| cfg: | |
| - {check: rubocop, os: ubuntu-latest, ruby: '3.3'} | |
| - {check: warnings, os: ubuntu-latest, ruby: '3.3'} | |
| runs-on: ${{ matrix.cfg.os }} | |
| steps: | |
| - name: Checkout current PR | |
| uses: actions/checkout@v5 | |
| - name: Install ruby version ${{ matrix.cfg.ruby }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.cfg.ruby }} | |
| bundler-cache: true | |
| - name: Run ${{ matrix.cfg.check }} check | |
| run: bundle exec rake ${{ matrix.cfg.check }} | |
| rspec_tests: | |
| name: ${{ matrix.cfg.os }}(ruby ${{ matrix.cfg.ruby }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cfg: | |
| - {os: ubuntu-24.04, ruby: '3.2'} | |
| - {os: ubuntu-24.04, ruby: '3.3'} | |
| - {os: ubuntu-24.04, ruby: '3.4'} | |
| - {os: ubuntu-24.04, ruby: 'jruby-9.4.8.0'} | |
| - {os: ubuntu-24.04, ruby: 'jruby-9.4.14.0'} | |
| - {os: windows-2025, ruby: '3.2'} | |
| - {os: windows-2025, ruby: '3.3'} | |
| - {os: windows-2025, ruby: '3.4'} | |
| runs-on: ${{ matrix.cfg.os }} | |
| steps: | |
| - name: Checkout current PR | |
| uses: actions/checkout@v5 | |
| - name: Install ruby version ${{ matrix.cfg.ruby }} | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.cfg.ruby }} | |
| bundler-cache: true | |
| - name: Output Ruby Environment | |
| run: bundle env | |
| - name: Build gem for all platforms | |
| run: bundle exec rake pl_ci:gem_build | |
| # Windows tests fail if the gem is in the filesystem | |
| - name: Cleanup builds | |
| if: runner.os == 'Windows' | |
| run: Remove-Item -Path *.gem | |
| - name: Run tests on Windows | |
| if: runner.os == 'Windows' | |
| run: | | |
| # https://github.com/ruby/ruby/pull/2791/files#diff-ff5ff976e81bebd977f0834e60416abbR97-R100 | |
| # Actions uses UTF8, causes test failures, similar to normal OS setup | |
| $PSDefaultParameterValues['*:Encoding'] = 'utf8' | |
| [Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") | |
| [Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("IBM437") | |
| $Env:LOG_SPEC_ORDER = 'true' | |
| # debug information | |
| chcp | |
| Get-WinSystemLocale | |
| Get-ChildItem Env: | % { Write-Output "$($_.Key): $($_.Value)" } | |
| # Enable Windows filesystem 8.3 support, see https://github.com/OpenVoxProject/openvox/pull/180 | |
| reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem /t REG_DWORD /v NtfsDisable8dot3NameCreation /d 0 /f | |
| # list current OpenSSL install | |
| gem list openssl | |
| ruby -ropenssl -e 'puts "OpenSSL Version - #{OpenSSL::OPENSSL_VERSION}"; puts "OpenSSL Library Version - #{OpenSSL::OPENSSL_LIBRARY_VERSION}"' | |
| # Run tests | |
| bundle exec rake parallel:spec | |
| - name: Run tests on Linux | |
| if: runner.os == 'Linux' | |
| run: | | |
| # debug information | |
| ruby -ropenssl -e 'puts "OpenSSL Version - #{OpenSSL::OPENSSL_VERSION}"; puts "OpenSSL Library Version - #{OpenSSL::OPENSSL_LIBRARY_VERSION}"' | |
| if [[ ${{ matrix.cfg.ruby }} =~ "jruby" ]]; then | |
| export _JAVA_OPTIONS='-Xmx1024m -Xms512m' | |
| # workaround for PUP-10683 | |
| sudo apt remove rpm | |
| fi | |
| bundle exec rake parallel:spec | |
| rake_checks: | |
| name: AIO Package Rake Checks | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| # needs fetch-depth because the packaging dem reads old git tags | |
| - name: Checkout current PR | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install Ruby version 3.3 | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.3 | |
| bundler-cache: true | |
| - name: Validate code | |
| run: | | |
| bundle exec rake rubocop | |
| bundle exec rake -T | grep vox:build | |
| bundle exec rake -T | grep vox:promote | |
| bundle exec rake -T | grep vox:upload | |
| working-directory: packaging | |
| tests: | |
| if: always() | |
| needs: | |
| - checks | |
| - rspec_tests | |
| - rake_checks | |
| runs-on: ubuntu-24.04 | |
| name: Test suite | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@release/v1 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |