From b667e288e27a09ce4f65166fc66a6b713350a9b6 Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Fri, 23 Apr 2021 22:54:31 -0700 Subject: move travis, appveyor, ci.yml.disabled to `unmaintained/` (#17828) * move travis, appveyor, ci.yml.disabled to unmaintained * update some mentions of travis, appevyor * fix test --- .github/workflows/ci.yml.disabled | 105 -------------------------------------- .travis.yml | 52 ------------------- appveyor.yml.disabled | 37 -------------- changelog.md | 2 + doc/contributing.rst | 4 +- testament/specs.nim | 4 +- tests/async/tasyncdial.nim | 1 - tests/stdlib/tmemlinesBuf.nim | 8 +-- tests/stdlib/tnetdial.nim | 1 - tests/system/talloc.nim | 6 +-- tests/system/talloc2.nim | 2 +- unmaintained/.travis.yml | 52 +++++++++++++++++++ unmaintained/appveyor.yml | 37 ++++++++++++++ unmaintained/ci.yml | 105 ++++++++++++++++++++++++++++++++++++++ unmaintained/readme.md | 11 ++++ 15 files changed, 214 insertions(+), 213 deletions(-) delete mode 100644 .github/workflows/ci.yml.disabled delete mode 100644 .travis.yml delete mode 100644 appveyor.yml.disabled create mode 100644 unmaintained/.travis.yml create mode 100644 unmaintained/appveyor.yml create mode 100644 unmaintained/ci.yml create mode 100644 unmaintained/readme.md diff --git a/.github/workflows/ci.yml.disabled b/.github/workflows/ci.yml.disabled deleted file mode 100644 index 62daf875a..000000000 --- a/.github/workflows/ci.yml.disabled +++ /dev/null @@ -1,105 +0,0 @@ -# out of date and unused but revivable - -name: Continous Integration -on: [push, pull_request] - -jobs: - build: - strategy: - matrix: - os: [ubuntu-18.04, macos-10.15, windows-2019] - cpu: [amd64, i386] - cpp: ['false', 'true'] - pkg: ['false', 'true'] - exclude: - - os: ubuntu-18.04 - cpp: 'true' - - os: ubuntu-18.04 - pkg: 'true' - - os: macos-10.15 - cpu: i386 - - os: macos-10.15 - pkg: 'true' - - os: windows-2019 - cpu: i386 - - os: windows-2019 - cpp: 'true' - name: '${{ matrix.os }} (${{ matrix.cpu }}, cpp: ${{ matrix.cpp }}, pkg: ${{ matrix.pkg }})' - runs-on: ${{ matrix.os }} - env: - NIM_COMPILE_TO_CPP: ${{ matrix.cpp }} - NIM_TEST_PACKAGES: ${{ matrix.pkg }} - steps: - - name: 'Checkout' - uses: actions/checkout@v2 - - - name: 'Install node.js 8.x' - uses: actions/setup-node@v1 - with: - node-version: '8.x' - - name: 'Install dependencies (Linux amd64)' - if: runner.os == 'Linux' && matrix.cpu == 'amd64' - run: | - sudo apt-fast update -qq - DEBIAN_FRONTEND='noninteractive' \ - sudo apt-fast install --no-install-recommends -yq \ - libcurl4-openssl-dev libgc-dev libsdl1.2-dev libsfml-dev \ - valgrind libc6-dbg - - name: 'Install dependencies (Linux i386)' - if: runner.os == 'Linux' && matrix.cpu == 'i386' - run: | - sudo dpkg --add-architecture i386 - - sudo apt-fast update -qq - DEBIAN_FRONTEND='noninteractive' \ - sudo apt-fast install --no-install-recommends --allow-downgrades -yq \ - g++-multilib gcc-multilib libcurl4-openssl-dev:i386 libgc-dev:i386 \ - libsdl1.2-dev:i386 libsfml-dev:i386 libglib2.0-dev:i386 \ - libffi-dev:i386 - - cat << EOF > bin/gcc - #!/bin/bash - - exec $(which gcc) -m32 "\$@" - EOF - cat << EOF > bin/g++ - #!/bin/bash - - exec $(which g++) -m32 "\$@" - EOF - - chmod 755 bin/gcc - chmod 755 bin/g++ - - name: 'Install dependencies (macOS)' - if: runner.os == 'macOS' - run: brew install boehmgc make sfml - - name: 'Install dependencies (Windows)' - if: runner.os == 'Windows' - shell: bash - run: | - mkdir dist - curl -L https://nim-lang.org/download/mingw64.7z -o dist/mingw64.7z - curl -L https://nim-lang.org/download/dlls.zip -o dist/dlls.zip - 7z x dist/mingw64.7z -odist - 7z x dist/dlls.zip -obin - echo "${{ github.workspace }}/dist/mingw64/bin" >> "${GITHUB_PATH}" - - - name: 'Add build binaries to PATH' - shell: bash - run: echo "${{ github.workspace }}/bin" >> "${GITHUB_PATH}" - - - name: 'Build csourcesAny' - shell: bash - run: . ci/funs.sh && nimBuildCsourcesIfNeeded CC=gcc ucpu='${{ matrix.cpu }}' - - - name: 'Build koch' - shell: bash - run: nim c koch - - name: 'Run CI' - shell: bash - run: ./koch runCI - - - name: 'Show failed tests' - if: failure() - shell: bash - run: nim c -r tools/ci_testresults.nim diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 13e5d151a..000000000 --- a/.travis.yml +++ /dev/null @@ -1,52 +0,0 @@ -# deprecated, out of date and unused -sudo: false -language: c - -dist: xenial - -matrix: - include: - - os: linux - env: - - NIM_COMPILE_TO_CPP=false - - CPU=amd64 - -addons: - apt: - # update the list above if more deps are introduced - packages: - - libcurl4-openssl-dev - - libsdl1.2-dev - - libgc-dev - - libsfml-dev - - libc6-dbg - - valgrind - -before_script: - - . ci/funs.sh && nimBuildCsourcesIfNeeded LD=$CC ucpu=$CPU - - export PATH="$PWD/bin${PATH:+:$PATH}" - -script: - - echo "travis_fold:start:nim_c_koch" - - nim c koch - - echo "travis_fold:end:nim_c_koch" - - echo "travis_fold:start:koch_boot" - - ./koch boot - - echo "travis_fold:end:koch_boot" - - echo "travis_fold:start:koch_doc" - - ./koch doc - - echo "travis_fold:end:koch_doc" - -before_deploy: - # Make https://nim-lang.github.io/Nim work the same as https://nim-lang.github.io/Nim/overview.html - - cp -f ./doc/html/overview.html ./doc/html/index.html - -deploy: # https://nim-lang.github.io/Nim - provider: pages - # local-dir *has* to be a relative path from the repo root. - local-dir: "doc/html" - skip-cleanup: true - github-token: "$GITHUB_OAUTH_TOKEN" - keep-history: false - on: - branch: devel diff --git a/appveyor.yml.disabled b/appveyor.yml.disabled deleted file mode 100644 index b13c5d909..000000000 --- a/appveyor.yml.disabled +++ /dev/null @@ -1,37 +0,0 @@ -# deprecated, out of date and unused -version: '{build}' - -environment: - DLLS_URL: https://nim-lang.org/download/dlls.zip - DLLS_ARCHIVE: dlls.zip - MINGW_DIR: mingw64 - MINGW_URL: https://nim-lang.org/download/mingw64.7z - MINGW_ARCHIVE: mingw64.7z - - matrix: - - NIM_TEST_PACKAGES: false - - NIM_TEST_PACKAGES: true - -cache: - - '%MINGW_ARCHIVE%' - - '%DLLS_ARCHIVE%' - - -install: - - ps: Install-Product node 8 # node 8 or later is required to test js async stuff - - IF not exist "%DLLS_ARCHIVE%" appveyor DownloadFile "%DLLS_URL%" -FileName "%DLLS_ARCHIVE%" - - 7z x -y "%DLLS_ARCHIVE%" -o"%CD%\BIN"> nul - - IF not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%" - - 7z x -y "%MINGW_ARCHIVE%" -o"%CD%\DIST"> nul - - SET PATH=%CD%\DIST\%MINGW_DIR%\BIN;%CD%\BIN;%PATH% - # may need adjustments, untested, see similar examples here: - # https://chromium.googlesource.com/external/github.com/swig/swig/+/1e36f51346d95f8b9848e682c2eb986e9cb9b4f4/appveyor.yml - - bash -c ". ci/funs.sh && nimBuildCsourcesIfNeeded" - -build_script: - - openssl version - - openssl version -d - - bin\nim c koch - - koch runCI - -deploy: off diff --git a/changelog.md b/changelog.md index d7b568aa0..943b5d6df 100644 --- a/changelog.md +++ b/changelog.md @@ -57,6 +57,8 @@ - The unary slice `..b` was removed, use `0..b` instead or use `-d:nimLegacyUnarySlice` for a deprecation period. +- Moved `.travis.yml`, `appveyor.yml.disabled`, `.github/workflows/ci.yml.disabled` to `unmaintained/`. + ## Standard library additions and changes - Added support for parenthesized expressions in `strformat` diff --git a/doc/contributing.rst b/doc/contributing.rst index 81fa9f8eb..abc81dae6 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -155,7 +155,7 @@ To run a single test: ./koch test run tests/stdlib/tos.nim # can also provide relative path For reproducible tests (to reproduce an environment more similar to the one -run by Continuous Integration on travis/appveyor), you may want to disable your +run by Continuous Integration on github actions/azure pipelines), you may want to disable your local configuration (e.g. in ``~/.config/nim/nim.cfg``) which may affect some tests; this can also be achieved by using `export XDG_CONFIG_HOME=pathtoAlternateConfig`:cmd: before running `./koch`:cmd: @@ -517,7 +517,7 @@ Continuous Integration (CI) the CI pipeline and affects other PR's; if you don't need it (e.g. for WIP or documentation only changes), add ``[skip ci]`` to your commit message title. This convention is supported by our github actions pipelines and our azure pipeline - as well as our former other pipelines: + (using custom logic, which should complete in < 1mn) as well as our former other pipelines: `Appveyor `_ and `Travis `_. diff --git a/testament/specs.nim b/testament/specs.nim index 043f14ed3..38e4ed0db 100644 --- a/testament/specs.nim +++ b/testament/specs.nim @@ -328,9 +328,9 @@ proc parseSpec*(filename: string): TSpec = when defined(unix): result.err = reDisabled of "posix": when defined(posix): result.err = reDisabled - of "travis": + of "travis": # deprecated if isTravis: result.err = reDisabled - of "appveyor": + of "appveyor": # deprecated if isAppVeyor: result.err = reDisabled of "azure": if isAzure: result.err = reDisabled diff --git a/tests/async/tasyncdial.nim b/tests/async/tasyncdial.nim index a755de74e..f0377dfd5 100644 --- a/tests/async/tasyncdial.nim +++ b/tests/async/tasyncdial.nim @@ -3,7 +3,6 @@ discard """ OK AF_INET OK AF_INET6 ''' - disabled: "travis" """ import diff --git a/tests/stdlib/tmemlinesBuf.nim b/tests/stdlib/tmemlinesBuf.nim index ea607525d..3f0bd5182 100644 --- a/tests/stdlib/tmemlinesBuf.nim +++ b/tests/stdlib/tmemlinesBuf.nim @@ -1,8 +1,3 @@ -discard """ -output: "15" -disabled: "appveyor" -""" - import memfiles var inp = memfiles.open("tests/stdlib/tmemlinesBuf.nim") var buffer: string = "" @@ -11,5 +6,4 @@ for line in lines(inp, buffer): lineCount += 1 close(inp) - -echo lineCount +doAssert lineCount == 9, $lineCount # this file's number of lines diff --git a/tests/stdlib/tnetdial.nim b/tests/stdlib/tnetdial.nim index f940bd630..3de00ff99 100644 --- a/tests/stdlib/tnetdial.nim +++ b/tests/stdlib/tnetdial.nim @@ -2,7 +2,6 @@ discard """ cmd: "nim c --threads:on $file" exitcode: 0 output: "OK" - disabled: "travis" """ import os, net, nativesockets, asyncdispatch diff --git a/tests/system/talloc.nim b/tests/system/talloc.nim index 9b970fda0..a81fef481 100644 --- a/tests/system/talloc.nim +++ b/tests/system/talloc.nim @@ -1,8 +1,4 @@ -discard """ -disabled: "appveyor" -""" - -# appveyor is "out of memory" +# was: appveyor is "out of memory" var x: ptr int diff --git a/tests/system/talloc2.nim b/tests/system/talloc2.nim index c498a3f4b..9d1687f34 100644 --- a/tests/system/talloc2.nim +++ b/tests/system/talloc2.nim @@ -5,7 +5,7 @@ joinable: false disabled: 32bit """ # no point to test this on system with smaller address space -# appveyor is "out of memory" +# was: appveyor is "out of memory" const nmax = 2*1024*1024*1024 diff --git a/unmaintained/.travis.yml b/unmaintained/.travis.yml new file mode 100644 index 000000000..13e5d151a --- /dev/null +++ b/unmaintained/.travis.yml @@ -0,0 +1,52 @@ +# deprecated, out of date and unused +sudo: false +language: c + +dist: xenial + +matrix: + include: + - os: linux + env: + - NIM_COMPILE_TO_CPP=false + - CPU=amd64 + +addons: + apt: + # update the list above if more deps are introduced + packages: + - libcurl4-openssl-dev + - libsdl1.2-dev + - libgc-dev + - libsfml-dev + - libc6-dbg + - valgrind + +before_script: + - . ci/funs.sh && nimBuildCsourcesIfNeeded LD=$CC ucpu=$CPU + - export PATH="$PWD/bin${PATH:+:$PATH}" + +script: + - echo "travis_fold:start:nim_c_koch" + - nim c koch + - echo "travis_fold:end:nim_c_koch" + - echo "travis_fold:start:koch_boot" + - ./koch boot + - echo "travis_fold:end:koch_boot" + - echo "travis_fold:start:koch_doc" + - ./koch doc + - echo "travis_fold:end:koch_doc" + +before_deploy: + # Make https://nim-lang.github.io/Nim work the same as https://nim-lang.github.io/Nim/overview.html + - cp -f ./doc/html/overview.html ./doc/html/index.html + +deploy: # https://nim-lang.github.io/Nim + provider: pages + # local-dir *has* to be a relative path from the repo root. + local-dir: "doc/html" + skip-cleanup: true + github-token: "$GITHUB_OAUTH_TOKEN" + keep-history: false + on: + branch: devel diff --git a/unmaintained/appveyor.yml b/unmaintained/appveyor.yml new file mode 100644 index 000000000..b13c5d909 --- /dev/null +++ b/unmaintained/appveyor.yml @@ -0,0 +1,37 @@ +# deprecated, out of date and unused +version: '{build}' + +environment: + DLLS_URL: https://nim-lang.org/download/dlls.zip + DLLS_ARCHIVE: dlls.zip + MINGW_DIR: mingw64 + MINGW_URL: https://nim-lang.org/download/mingw64.7z + MINGW_ARCHIVE: mingw64.7z + + matrix: + - NIM_TEST_PACKAGES: false + - NIM_TEST_PACKAGES: true + +cache: + - '%MINGW_ARCHIVE%' + - '%DLLS_ARCHIVE%' + + +install: + - ps: Install-Product node 8 # node 8 or later is required to test js async stuff + - IF not exist "%DLLS_ARCHIVE%" appveyor DownloadFile "%DLLS_URL%" -FileName "%DLLS_ARCHIVE%" + - 7z x -y "%DLLS_ARCHIVE%" -o"%CD%\BIN"> nul + - IF not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%" + - 7z x -y "%MINGW_ARCHIVE%" -o"%CD%\DIST"> nul + - SET PATH=%CD%\DIST\%MINGW_DIR%\BIN;%CD%\BIN;%PATH% + # may need adjustments, untested, see similar examples here: + # https://chromium.googlesource.com/external/github.com/swig/swig/+/1e36f51346d95f8b9848e682c2eb986e9cb9b4f4/appveyor.yml + - bash -c ". ci/funs.sh && nimBuildCsourcesIfNeeded" + +build_script: + - openssl version + - openssl version -d + - bin\nim c koch + - koch runCI + +deploy: off diff --git a/unmaintained/ci.yml b/unmaintained/ci.yml new file mode 100644 index 000000000..62daf875a --- /dev/null +++ b/unmaintained/ci.yml @@ -0,0 +1,105 @@ +# out of date and unused but revivable + +name: Continous Integration +on: [push, pull_request] + +jobs: + build: + strategy: + matrix: + os: [ubuntu-18.04, macos-10.15, windows-2019] + cpu: [amd64, i386] + cpp: ['false', 'true'] + pkg: ['false', 'true'] + exclude: + - os: ubuntu-18.04 + cpp: 'true' + - os: ubuntu-18.04 + pkg: 'true' + - os: macos-10.15 + cpu: i386 + - os: macos-10.15 + pkg: 'true' + - os: windows-2019 + cpu: i386 + - os: windows-2019 + cpp: 'true' + name: '${{ matrix.os }} (${{ matrix.cpu }}, cpp: ${{ matrix.cpp }}, pkg: ${{ matrix.pkg }})' + runs-on: ${{ matrix.os }} + env: + NIM_COMPILE_TO_CPP: ${{ matrix.cpp }} + NIM_TEST_PACKAGES: ${{ matrix.pkg }} + steps: + - name: 'Checkout' + uses: actions/checkout@v2 + + - name: 'Install node.js 8.x' + uses: actions/setup-node@v1 + with: + node-version: '8.x' + - name: 'Install dependencies (Linux amd64)' + if: runner.os == 'Linux' && matrix.cpu == 'amd64' + run: | + sudo apt-fast update -qq + DEBIAN_FRONTEND='noninteractive' \ + sudo apt-fast install --no-install-recommends -yq \ + libcurl4-openssl-dev libgc-dev libsdl1.2-dev libsfml-dev \ + valgrind libc6-dbg + - name: 'Install dependencies (Linux i386)' + if: runner.os == 'Linux' && matrix.cpu == 'i386' + run: | + sudo dpkg --add-architecture i386 + + sudo apt-fast update -qq + DEBIAN_FRONTEND='noninteractive' \ + sudo apt-fast install --no-install-recommends --allow-downgrades -yq \ + g++-multilib gcc-multilib libcurl4-openssl-dev:i386 libgc-dev:i386 \ + libsdl1.2-dev:i386 libsfml-dev:i386 libglib2.0-dev:i386 \ + libffi-dev:i386 + + cat << EOF > bin/gcc + #!/bin/bash + + exec $(which gcc) -m32 "\$@" + EOF + cat << EOF > bin/g++ + #!/bin/bash + + exec $(which g++) -m32 "\$@" + EOF + + chmod 755 bin/gcc + chmod 755 bin/g++ + - name: 'Install dependencies (macOS)' + if: runner.os == 'macOS' + run: brew install boehmgc make sfml + - name: 'Install dependencies (Windows)' + if: runner.os == 'Windows' + shell: bash + run: | + mkdir dist + curl -L https://nim-lang.org/download/mingw64.7z -o dist/mingw64.7z + curl -L https://nim-lang.org/download/dlls.zip -o dist/dlls.zip + 7z x dist/mingw64.7z -odist + 7z x dist/dlls.zip -obin + echo "${{ github.workspace }}/dist/mingw64/bin" >> "${GITHUB_PATH}" + + - name: 'Add build binaries to PATH' + shell: bash + run: echo "${{ github.workspace }}/bin" >> "${GITHUB_PATH}" + + - name: 'Build csourcesAny' + shell: bash + run: . ci/funs.sh && nimBuildCsourcesIfNeeded CC=gcc ucpu='${{ matrix.cpu }}' + + - name: 'Build koch' + shell: bash + run: nim c koch + - name: 'Run CI' + shell: bash + run: ./koch runCI + + - name: 'Show failed tests' + if: failure() + shell: bash + run: nim c -r tools/ci_testresults.nim diff --git a/unmaintained/readme.md b/unmaintained/readme.md new file mode 100644 index 000000000..cddb15cd2 --- /dev/null +++ b/unmaintained/readme.md @@ -0,0 +1,11 @@ +Deprecated, unused and unmaintained files can be moved here when they have some value, +e.g. if someone want to revive them in their project or in this repo. If a deprecated and unused file +is redundant, it should just be removed instead. + +See also https://github.com/nim-lang/graveyard, which is maintained on a best effort basis +and has different goals. + +## table of contents +.travis.yml -> unmaintained/.travis.yml +appveyor.yml.disabled -> unmaintained/appveyor.yml +.github/workflows/ci.yml.disabled -> unmaintained/ci.yml -- cgit 1.4.1-2-gfad0