diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 92e86c5..0000000 --- a/.appveyor.yml +++ /dev/null @@ -1,90 +0,0 @@ -version: '{build}' - -cache: - - x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z -> .appveyor.yml - - i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z -> .appveyor.yml - - Nim -> .appveyor.yml - -matrix: - # We always want 32 and 64-bit compilation - fast_finish: false - -platform: - - x86 - - x64 - -install: - - setlocal EnableExtensions EnableDelayedExpansion - - - SET "MINGW_BASE=https://github.com/brechtsanders/winlibs_mingw/releases/download/11.2.0-12.0.1-9.0.0-r1" - - - IF "%PLATFORM%" == "x86" ( - SET "MINGW_ARCHIVE=winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64-9.0.0-r1.7z" & - SET "MINGW_URL=%MINGW_BASE%/%MINGW_ARCHIVE%" & - SET "MINGW_DIR=mingw32" - ) ELSE ( - IF "%PLATFORM%" == "x64" ( - SET "MINGW_ARCHIVE=winlibs-i686-posix-dwarf-gcc-11.2.0-mingw-w64-9.0.0-r1.7z" & - SET "MINGW_URL=%MINGW_BASE%/%MINGW_ARCHIVE%" & - SET "MINGW_DIR=mingw64" - ) else ( - echo "Unknown platform" - ) - ) - - - SET PATH=%CD%\%MINGW_DIR%\bin;%CD%\Nim\bin;%PATH% - - # Unpack mingw - - IF NOT EXIST "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%" - - 7z x -y "%MINGW_ARCHIVE%" > nul - - # build nim from our own branch - this to avoid the day-to-day churn and - # regressions of the fast-paced Nim development while maintaining the - # flexibility to apply patches - - SET "NEED_REBUILD=" - - - IF NOT EXIST "Nim\\.git\\" ( - git clone --depth 1 https://github.com/nim-lang/Nim.git - ) ELSE ( - ( cd Nim ) & - ( git pull ) & - ( cd .. ) - ) - - # Rebuild Nim if HEAD has moved or if we don't yet have a cached version - - IF NOT EXIST "Nim\\ver.txt" ( - SET NEED_REBUILD=1 - ) ELSE ( - ( CD Nim ) & - ( git rev-parse HEAD > ..\\cur_ver.txt ) & - ( fc ver.txt ..\\cur_ver.txt > nul ) & - ( IF NOT ERRORLEVEL == 0 SET NEED_REBUILD=1 ) & - ( cd .. ) - ) - - - IF NOT EXIST "Nim\\bin\\nim.exe" SET NEED_REBUILD=1 - - IF NOT EXIST "Nim\\bin\\nimble.exe" SET NEED_REBUILD=1 - - # after building nim, wipe csources to save on cache space - - IF DEFINED NEED_REBUILD ( - cd Nim & - ( IF EXIST "csources" rmdir /s /q csources ) & - git clone --depth 1 https://github.com/nim-lang/csources_v1 & - cd csources & - ( IF "%PLATFORM%" == "x64" ( build64.bat > nul ) else ( build.bat > nul ) ) & - cd .. & - bin\nim c --verbosity:0 --hints:off koch & - koch boot -d:release --verbosity:0 --hints:off & - koch nimble > nul & - git rev-parse HEAD > ver.txt & - rmdir /s /q csources - ) - -build_script: - - cd C:\projects\%APPVEYOR_PROJECT_SLUG% - - nimble install -y - -test_script: - - nimble test - -deploy: off diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6e231e..6ba4853 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,8 @@ jobs: cpu: i386 - os: macos cpu: amd64 + - os: macos + cpu: arm64 - os: windows cpu: amd64 - os: windows @@ -22,10 +24,10 @@ jobs: include: - target: os: linux - builder: ubuntu-20.04 + builder: ubuntu-24.04 - target: os: macos - builder: macos-11 + builder: macos-13 - target: os: windows builder: windows-latest @@ -34,25 +36,17 @@ jobs: runs-on: ${{ matrix.builder }} steps: - name: Checkout nim-noise - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: path: nim-noise submodules: false - - name: Install build dependencies (MacOS) - if: runner.os == 'macos' - run: | - brew update - brew install openssl@1.1 - ln -s /usr/local/opt/openssl/lib/libcrypto.1.1.dylib /usr/local/lib/ - ln -s /usr/local/opt/openssl/lib/libssl.1.1.dylib /usr/local/lib/ - - name: Install build dependencies (Linux i386) if: runner.os == 'Linux' && matrix.target.cpu == 'i386' run: | sudo dpkg --add-architecture i386 - sudo apt-fast update -qq - sudo DEBIAN_FRONTEND='noninteractive' apt-fast install \ + sudo apt-get update -qq + sudo DEBIAN_FRONTEND='noninteractive' apt-get install \ --no-install-recommends -yq gcc-multilib g++-multilib \ libssl-dev:i386 mkdir -p external/bin @@ -67,40 +61,40 @@ jobs: chmod 755 external/bin/gcc external/bin/g++ echo '${{ github.workspace }}/external/bin' >> $GITHUB_PATH - - name: Restore MinGW-W64 (Windows) from cache + - name: Restore llvm-mingw (Windows) from cache if: runner.os == 'Windows' id: windows-mingw-cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: external/mingw-${{ matrix.target.cpu }} - key: 'mingw-${{ matrix.target.cpu }}' + key: 'mingw-llvm-17-${{ matrix.target.cpu }}' - name: Restore Nim DLLs dependencies (Windows) from cache if: runner.os == 'Windows' id: windows-dlls-cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: external/dlls-${{ matrix.target.cpu }} key: 'dlls-${{ matrix.target.cpu }}' - - name: Install MinGW64 dependency (Windows) + - name: Install llvm-mingw dependency (Windows) if: > steps.windows-mingw-cache.outputs.cache-hit != 'true' && runner.os == 'Windows' shell: bash run: | mkdir -p external - MINGW_BASE="https://github.com/brechtsanders/winlibs_mingw/releases/download/11.2.0-12.0.1-9.0.0-r1" + MINGW_BASE="https://github.com/mstorsjo/llvm-mingw/releases/download/20230905" if [[ '${{ matrix.target.cpu }}' == 'amd64' ]]; then - MINGW_URL="$MINGW_BASE/winlibs-x86_64-posix-seh-gcc-11.2.0-mingw-w64-9.0.0-r1.7z" + MINGW_URL="$MINGW_BASE/llvm-mingw-20230905-ucrt-x86_64.zip" ARCH=64 else - MINGW_URL="$MINGW_BASE/winlibs-i686-posix-dwarf-gcc-11.2.0-mingw-w64-9.0.0-r1.7z" + MINGW_URL="$MINGW_BASE/llvm-mingw-20230905-ucrt-i686.zip" ARCH=32 fi - curl -L "$MINGW_URL" -o "external/mingw-${{ matrix.target.cpu }}.7z" - 7z x -y "external/mingw-${{ matrix.target.cpu }}.7z" -oexternal/ - mv external/mingw$ARCH external/mingw-${{ matrix.target.cpu }} + curl -L "$MINGW_URL" -o "external/mingw-${{ matrix.target.cpu }}.zip" + 7z x -y "external/mingw-${{ matrix.target.cpu }}.zip" -oexternal/mingw-${{ matrix.target.cpu }}/ + mv external/mingw-${{ matrix.target.cpu }}/**/* ./external/mingw-${{ matrix.target.cpu }} - name: Install DLLs dependencies (Windows) if: > @@ -132,13 +126,13 @@ jobs: git ls-remote "https://github.com/$1" "${2:-HEAD}" | cut -f 1 } nimHash=$(getHash nim-lang/Nim devel) - csourcesHash=$(getHash nim-lang/csources_v1) - echo "::set-output name=nim::$nimHash" - echo "::set-output name=csources::$csourcesHash" + csourcesHash=$(getHash nim-lang/csources_v2) + echo "nim=$nimHash" >> $GITHUB_ENV + echo "csources=$csourcesHash" >> $GITHUB_ENV - name: Restore prebuilt Nim from cache id: nim-cache - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: nim key: 'nim-${{ matrix.target.os }}-${{ matrix.target.cpu }}-${{ steps.versions.outputs.nim }}' @@ -146,7 +140,7 @@ jobs: - name: Restore prebuilt csources from cache if: steps.nim-cache.outputs.cache-hit != 'true' id: csources-cache - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: csources/bin key: 'csources-${{ matrix.target.os }}-${{ matrix.target.cpu }}-${{ steps.versions.outputs.csources }}' @@ -155,15 +149,15 @@ jobs: if: > steps.csources-cache.outputs.cache-hit != 'true' && steps.nim-cache.outputs.cache-hit != 'true' - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: - repository: nim-lang/csources_v1 + repository: nim-lang/csources_v2 path: csources ref: ${{ steps.versions.outputs.csources }} - name: Checkout Nim if: steps.nim-cache.outputs.cache-hit != 'true' - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: nim-lang/Nim path: nim diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2ea8d2c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -language: c # or other C/C++ variants - -sudo: false - -# https://docs.travis-ci.com/user/caching/ -# -# Caching the whole nim folder is better than relying on ccache - this way, we -# skip the expensive bootstrap process and linking -cache: - directories: - - nim - -os: - - linux - - osx - -install: - # build nim from our own branch - this to avoid the day-to-day churn and - # regressions of the fast-paced Nim development while maintaining the - # flexibility to apply patches - # - # check version of remote branch - - "export NIMVER=$(git ls-remote https://github.com/nim-lang/nim.git HEAD | cut -f 1)" - - # after building nim, wipe csources to save on cache space - - "{ [ -f nim/$NIMVER/bin/nim ] && [ -f nim/$NIMVER/bin/nimble ] ; } || - { rm -rf nim ; - mkdir -p nim ; - git clone --depth=1 https://github.com/nim-lang/nim.git nim/$NIMVER ; - cd nim/$NIMVER ; - sh build_all.sh > /dev/null; - rm -rf csources ; - cd ../.. ; - }" - - "export PATH=$PWD/nim/$NIMVER/bin:$PATH" - -script: - - nimble install -y > /dev/null - - nimble test