about summary refs log tree commit diff stats
ModeNameSize
-rw-r--r--.hgtags1581log stats plain blame
-rw-r--r--LICENSE1204log stats plain blame
-rw-r--r--Makefile1543log stats plain blame
-rw-r--r--README1088log stats plain blame
-rw-r--r--client.c7278log stats plain blame
-rw-r--r--config.arg.h3984log stats plain blame
-rw-r--r--config.default.h3803log stats plain blame
-rw-r--r--config.mk579log stats plain blame
-rw-r--r--draw.c4397log stats plain blame
-rw-r--r--dwm.14297log stats plain blame
-rw-r--r--dwm.h7035log stats plain blame
-rw-r--r--dwm.png373log stats plain blame
-rw-r--r--event.c8314log stats plain blame
-rw-r--r--main.c8348log stats plain blame
-rw-r--r--tag.c2475log stats plain blame
-rw-r--r--util.c1061log stats plain blame
-rw-r--r--view.c4697log stats plain blame
String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
trigger:
  branches:
    include:
    - '*'
pr:
  branches:
    include:
    - '*'

jobs:
- job: packages

  timeoutInMinutes: 90 # default `60` led to lots of cancelled jobs; use 0 for unlimited (may be undesirable)

  strategy:
    matrix:
      Linux_amd64:
        vmImage: 'ubuntu-16.04'
        CPU: amd64
      Linux_i386:
        # bug #17325: fails on 'ubuntu-16.04' because it now errors with:
        # g++-multilib : Depends: gcc-multilib (>= 4:5.3.1-1ubuntu1) but it is not going to be installed
        vmImage: 'ubuntu-18.04'
        CPU: i386
      OSX_amd64:
        vmImage: 'macOS-10.15'
        CPU: amd64
      OSX_amd64_cpp:
        vmImage: 'macOS-10.15'
        CPU: amd64
        NIM_COMPILE_TO_CPP: true
      Windows_amd64_batch0_3:
        vmImage: 'windows-2019'
        CPU: amd64
        # see also: `NIM_TEST_PACKAGES`
        NIM_TESTAMENT_BATCH: "0_3"
      Windows_amd64_batch1_3:
        vmImage: 'windows-2019'
        CPU: amd64
        NIM_TESTAMENT_BATCH: "1_3"
      Windows_amd64_batch2_3:
        vmImage: 'windows-2019'
        CPU: amd64
        NIM_TESTAMENT_BATCH: "2_3"

  pool:
    vmImage: $(vmImage)

  workspace:
    clean: all

  steps:
    - bash: git config --global core.autocrlf false
      displayName: 'Disable auto conversion to CRLF by git (Windows-only)'
      condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))

    - checkout: self
      fetchDepth: 2 # see D20210329T004830

    - bash: |
        # D20210329T004830:here refs https://github.com/microsoft/azure-pipelines-agent/issues/2944
        # `--no-merges` is needed to avoid merge commits which occur for PR's.
        # $(Build.SourceVersionMessage) is not helpful
        # nor is `github.event.head_commit.message` for github actions.
        commitMsg=$(git log --no-merges -1 --pretty=format:"%s")
        echo commitMsg: $commitMsg
        echo $commitMsg | grep -v '\[skip ci\]' # fails if [skip ci] not in commit msg
      displayName: 'Check whether to skip CI'

    - bash: git clone --depth 1 https://github.com/nim-lang/csources_v1 csources
      displayName: 'Checkout Nim csources'

    - task: NodeTool@0
      inputs:
        versionSpec: '12.x'
      displayName: 'Install node.js 12.x'

    - bash: |
        set -e
        . ci/funs.sh
        echo_run sudo apt-fast update -qq
        DEBIAN_FRONTEND='noninteractive' \
          echo_run sudo apt-fast install --no-install-recommends -yq \
            libcurl4-openssl-dev libgc-dev libsdl1.2-dev libsfml-dev valgrind libc6-dbg
      displayName: 'Install dependencies (amd64 Linux)'
      condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'), eq(variables['CPU'], 'amd64'))

    - bash: |
        set -e
        . ci/funs.sh
        echo_run sudo dpkg --add-architecture i386
        # Downgrade llvm:
        # - llvm has to be downgraded to have 32bit version installed for sfml.

        cat << EOF | sudo tee /etc/apt/preferences.d/pin-to-rel
        Package: libllvm6.0
        Pin: origin "azure.archive.ubuntu.com"
        Pin-Priority: 1001
        EOF

        # echo_run sudo apt-fast update -qq
        echo_run sudo apt-fast update -qq || echo "failed, see bug #17343"
        # `:i386` (e.g. in `libffi-dev:i386`) is needed otherwise you may get:
        # `could not load: libffi.so` during dynamic loading.
        DEBIAN_FRONTEND='noninteractive' \
          echo_run 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

        echo_run chmod 755 bin/gcc
        echo_run chmod 755 bin/g++

      displayName: 'Install dependencies (i386 Linux)'
      condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'), eq(variables['CPU'], 'i386'))

    - bash: brew install boehmgc make sfml
      displayName: 'Install dependencies (OSX)'
      condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))

    - bash: |
        set -e
        . ci/funs.sh
        echo_run mkdir dist
        echo_run curl -L https://nim-lang.org/download/mingw64.7z -o dist/mingw64.7z
        echo_run curl -L https://nim-lang.org/download/dlls.zip -o dist/dlls.zip
        echo_run 7z x dist/mingw64.7z -odist
        echo_run 7z x dist/dlls.zip -obin
        echo_run echo '##vso[task.prependpath]$(System.DefaultWorkingDirectory)/dist/mingw64/bin'

      displayName: 'Install dependencies (Windows)'
      condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))

    - bash: echo '##vso[task.prependpath]$(System.DefaultWorkingDirectory)/bin'
      displayName: 'Add build binaries to PATH'

    - bash: |
        set -e
        . ci/funs.sh
        echo_run echo 'PATH:' "$PATH"
        echo_run echo '##[section]gcc version'
        echo_run gcc -v
        echo_run echo '##[section]nodejs version'
        echo_run node -v
        echo_run echo '##[section]make version'
        echo_run make -v
      displayName: 'System information'

    - bash: echo '##vso[task.setvariable variable=csources_version]'"$(git -C csources rev-parse HEAD)"
      displayName: 'Get csources version'

    - task: Cache@2
      inputs:
        key: 'csources | "$(Agent.OS)" | $(CPU) | $(csources_version)'
        path: csources/bin
      displayName: 'Restore built csources'

    - bash: |
        set -e
        . ci/funs.sh
        ncpu=
        ext=
        case '$(Agent.OS)' in
        'Linux')
          ncpu=$(nproc)
          ;;
        'Darwin')
          ncpu=$(sysctl -n hw.ncpu)
          ;;
        'Windows_NT')
          ncpu=$NUMBER_OF_PROCESSORS
          ext=.exe
          ;;
        esac
        [[ -z "$ncpu" || $ncpu -le 0 ]] && ncpu=1

        if [[ -x csources/bin/nim$ext ]]; then
          echo_run echo "Found cached compiler, skipping build"
        else
          echo_run make -C csources -j $ncpu CC=gcc ucpu=$(CPU) koch=no
        fi

        echo_run cp csources/bin/nim$ext bin
      displayName: 'Build 1-stage compiler from csources'

    - bash: nim c koch
      displayName: 'Build koch'

      # set result to omit the "bash exited with error code '1'" message
    - bash: ./koch runCI || echo '##vso[task.complete result=Failed]'
      displayName: 'Run CI'
      env:
        SYSTEM_ACCESSTOKEN: $(System.AccessToken)