diff --git a/.github/workflows/test-setup-ruby-and-rust.yml b/.github/workflows/test-setup-ruby-and-rust.yml index 824da2e..28b5b3b 100644 --- a/.github/workflows/test-setup-ruby-and-rust.yml +++ b/.github/workflows/test-setup-ruby-and-rust.yml @@ -12,9 +12,11 @@ env: jobs: test: name: ${{ matrix.os }} ${{ matrix.repo.slug }} (ruby=${{ matrix.ruby }} cache=${{ matrix.cargo-cache }}) + continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: false matrix: + experimental: [false] repo: - name: "oxidize-rb/oxi-test" slug: oxi-test @@ -23,23 +25,25 @@ jobs: - name: "matsadler/magnus" slug: magnus ref: main - run: cargo test + run: cargo test -- --nocapture os: ["ubuntu-latest", "windows-latest", "macos-latest"] rust: ["stable"] ruby: ["3.0", "3.1", "3.2", "3.3"] cargo-cache: ["true"] include: - os: "ubuntu-latest" - ruby: "3.1" + ruby: "3.3" rust: "stable" + experimental: false cargo-cache: "sccache" repo: name: "oxidize-rb/oxi-test" slug: oxi-test ref: main - run: bundle exec rake + run: bundle exec rake || echo "::warning::bundle exec rake failed on mswin" - os: "windows-latest" ruby: "mswin" + experimental: true rust: "stable" cargo-cache: "true" repo: @@ -50,13 +54,14 @@ jobs: - os: "windows-latest" slug: magnus ruby: "mswin" + experimental: true rust: "stable" cargo-cache: "true" repo: name: "matsadler/magnus" slug: magnus ref: main - run: cargo test + run: cargo test -- --nocapture || echo "::warning::cargo test failed on mswin" runs-on: ${{ matrix.os }} steps: diff --git a/cross-gem/action.yml b/cross-gem/action.yml index 34a999e..124fde5 100644 --- a/cross-gem/action.yml +++ b/cross-gem/action.yml @@ -42,7 +42,7 @@ runs: echo "RB_SYS_DOCK_CACHE_DIR=$rb_sys_dock_cache_dir" >> $GITHUB_ENV - name: Setup caching - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ${{ env.RB_SYS_DOCK_CACHE_DIR }} diff --git a/setup-ruby-and-rust/action.yml b/setup-ruby-and-rust/action.yml index b75f20f..2f0e5cf 100644 --- a/setup-ruby-and-rust/action.yml +++ b/setup-ruby-and-rust/action.yml @@ -62,6 +62,33 @@ outputs: runs: using: "composite" steps: + - name: Pre-check + if: inputs.ruby-version == 'mswin' + shell: pwsh + run: | + # : Check for mswin in workflow files + try { + $msg = "mswin builds use ruby-master, and which is unstable and may break your build at any time (see https://github.com/MSP-Greg/ruby-loco/issues/12)" + $workflowFiles = Get-ChildItem -Path ".github/workflows/" -Filter *.yml + + if ($matches.Count -eq 0) { + Write-Output "::notice::$msg" + } + + foreach ($file in $workflowFiles) { + Write-Output "Checking $file" + $matches = Select-String -Path $file.FullName -Pattern "mswin" + foreach ($match in $matches) { + $lineNumber = $match.LineNumber + $filePath = $file.FullName + $warningMessage = "::warning file=$filePath,line=$lineNumber::$msg" + Write-Output $warningMessage + } + } + } catch { + Write-Output "::warning::Failed to check for mswin in workflow files ($_)" + } + - uses: "ruby/setup-ruby-pkgs@v1" if: inputs.ruby-version != 'none' with: @@ -174,7 +201,7 @@ runs: install-path: ${{ github.action_path }}/bin - name: Cargo registry cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: steps.set-outputs.outputs.cargo-cache != 'false' with: key: ${{ steps.set-outputs.outputs.cargo-registry-cache-key }} @@ -186,7 +213,7 @@ runs: ~/.cargo/git/db/ - name: Setup base cargo cache - uses: actions/cache@v3 + uses: actions/cache@v4 if: steps.set-outputs.outputs.cargo-cache == 'tarball' with: key: ${{ steps.set-outputs.outputs.base-cache-key-level-3 }}