diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c946a2d90f..2b6b3a436a 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -19,46 +19,46 @@ concurrency: cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} jobs: - test: - runs-on: ${{ matrix.os }} - continue-on-error: ${{ matrix.os == 'windows-latest' }} - strategy: - fail-fast: false - matrix: - julia-version: - - '1.6' - - '1.10' # to be removed in the near future - - '1.11' - - 'nightly' - os: - - ubuntu-latest - include: - # Add a few windows and macOS jobs (not too many, the number we can run in parallel is limited) - - julia-version: '1.10' - os: macOS-latest - - julia-version: '1.10' - os: windows-latest - - steps: - - uses: actions/checkout@v4 - - name: "Set up Julia" - uses: julia-actions/setup-julia@v2 - with: - version: ${{ matrix.julia-version }} - - name: "Cache artifacts" - uses: julia-actions/cache@v2 - - name: "Build package" - uses: julia-actions/julia-buildpkg@v1 - - name: "Run tests" - uses: julia-actions/julia-runtest@v1 - env: - HECKE_TEST_PARALLEL: "2" - with: - depwarn: error - # - name: "Process code coverage" - # uses: julia-actions/julia-processcoverage@v1 - # - name: "Upload coverage data to Codecov" - # uses: codecov/codecov-action@v3 +# test: +# runs-on: ${{ matrix.os }} +# continue-on-error: ${{ matrix.os == 'windows-latest' }} +# strategy: +# fail-fast: false +# matrix: +# julia-version: +# - '1.6' +# - '1.10' # to be removed in the near future +# - '1.11' +# - 'nightly' +# os: +# - ubuntu-latest +# include: +# # Add a few windows and macOS jobs (not too many, the number we can run in parallel is limited) +# - julia-version: '1.10' +# os: macOS-latest +# - julia-version: '1.10' +# os: windows-latest +# +# steps: +# - uses: actions/checkout@v4 +# - name: "Set up Julia" +# uses: julia-actions/setup-julia@v2 +# with: +# version: ${{ matrix.julia-version }} +# - name: "Cache artifacts" +# uses: julia-actions/cache@v2 +# - name: "Build package" +# uses: julia-actions/julia-buildpkg@v1 +# - name: "Run tests" +# uses: julia-actions/julia-runtest@v1 +# env: +# HECKE_TEST_PARALLEL: "2" +# with: +# depwarn: error +# # - name: "Process code coverage" +# # uses: julia-actions/julia-processcoverage@v1 +# # - name: "Upload coverage data to Codecov" +# # uses: codecov/codecov-action@v3 docs: name: Documentation diff --git a/.github/workflows/CILong.yml b/.github/workflows/CILong.yml index 6449df04ce..500ec87f62 100644 --- a/.github/workflows/CILong.yml +++ b/.github/workflows/CILong.yml @@ -22,7 +22,7 @@ jobs: fail-fast: false matrix: julia-version: - - '1.10' + #- '1.10' julia-arch: - x64 os: diff --git a/docs/src/assets/warner.js b/docs/src/assets/warner.js new file mode 100644 index 0000000000..3f6f5d0083 --- /dev/null +++ b/docs/src/assets/warner.js @@ -0,0 +1,52 @@ +function maybeAddWarning() { + // DOCUMENTER_NEWEST is defined in versions.js, DOCUMENTER_CURRENT_VERSION and DOCUMENTER_STABLE + // in siteinfo.js. + // If either of these are undefined something went horribly wrong, so we abort. + if ( + window.DOCUMENTER_NEWEST === undefined || + window.DOCUMENTER_CURRENT_VERSION === undefined || + window.DOCUMENTER_STABLE === undefined + ) { + return; + } + + // Current version is not a version number, so we can't tell if it's the newest version. Abort. + if (!/v(\d+\.)*\d+/.test(window.DOCUMENTER_CURRENT_VERSION)) { + return; + } + + // Current version is newest version, so no need to add a warning. + if (window.DOCUMENTER_NEWEST === window.DOCUMENTER_CURRENT_VERSION) { + return; + } + + // Add a noindex meta tag (unless one exists) so that search engines don't index this version of the docs. + if (document.body.querySelector('meta[name="robots"]') === null) { + const meta = document.createElement("meta"); + meta.name = "robots"; + meta.content = "noindex"; + + document.getElementsByTagName("head")[0].appendChild(meta); + } + + const div = document.createElement("div"); + div.classList.add("outdated-warning-overlay"); + const closer = document.createElement("button"); + closer.classList.add("outdated-warning-closer", "delete"); + closer.addEventListener("click", function () { + document.body.removeChild(div); + }); + const href = window.documenterBaseURL + "/../" + window.DOCUMENTER_STABLE; + div.innerHTML = + 'This documentation is not for the latest stable release, but for either the development version or an older release.
Click here to go to the documentation for the latest stable release.'; + div.appendChild(closer); + document.body.appendChild(div); +} + +if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", maybeAddWarning); +} else { + maybeAddWarning(); +}