|
| 1 | +name: Makefile CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | +env: |
| 7 | + # BASIC_PACKAGES is used fo the basic tools (make) |
| 8 | + BASIC_PACKAGES: git build-essential ccache libgc-dev graphviz libunwind-dev libreadline-dev pkg-config |
| 9 | + # MORE_PACKAGES is used for more tools and libs (make more) |
| 10 | + MORE_PACKAGES: libgmp-dev libcurl4-openssl-dev libevent-dev openjdk-17-jdk-headless libgles-dev libegl-dev libsdl1.2-dev libsdl2-dev libsdl2-mixer-dev libsdl2-gfx-dev libsdl2-image-dev libsdl2-net-dev libsdl2-ttf-dev libgtk-3-dev inkscape postgresql libxdg-basedir-dev gettext libsqlite3-dev libpq-dev libmongoc-dev openmpi-bin libopenmpi-dev |
| 11 | + JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64/ |
| 12 | + JNI_LIB_PATH: /usr/lib/jvm/java-17-openjdk-amd64/lib/server/ |
| 13 | + LD_LIBRARY_PATH: /usr/lib/jvm/java-17-openjdk-amd64/lib/server/ |
| 14 | + |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + runs-on: ubuntu-24.04 |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v4 |
| 20 | + - name: Install dependencies |
| 21 | + run: sudo apt-get update && sudo apt-get install -y $BASIC_PACKAGES |
| 22 | + - run: make |
| 23 | + - uses: actions/upload-artifact@v4 |
| 24 | + with: |
| 25 | + path: bin |
| 26 | + name: bin |
| 27 | + |
| 28 | + sanity-check: |
| 29 | + runs-on: ubuntu-24.04 |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v4 |
| 32 | + - run: misc/jenkins/ensuregit.sh |
| 33 | + - run: misc/jenkins/checkwhitespaces.sh |
| 34 | + if: success() || failure() |
| 35 | + - run: misc/jenkins/checklicense.sh |
| 36 | + if: success() || failure() |
| 37 | + - run: misc/jenkins/checksignedoffby.sh |
| 38 | + if: success() || failure() |
| 39 | + |
| 40 | + tests-some: |
| 41 | + runs-on: ubuntu-24.04 |
| 42 | + needs: [build] |
| 43 | + container: "ubuntu:24.04" |
| 44 | + services: |
| 45 | + postgres: |
| 46 | + image: postgres |
| 47 | + env: |
| 48 | + POSTGRES_HOST_AUTH_METHOD: trust |
| 49 | + mongo: |
| 50 | + image: mongo |
| 51 | + neo4j: |
| 52 | + image: 'neo4j:2.3' |
| 53 | + env: |
| 54 | + NEO4J_AUTH: none |
| 55 | + strategy: |
| 56 | + fail-fast: false |
| 57 | + matrix: |
| 58 | + engine: [nitcg, nitcs, nitcsg, nitce, niti] |
| 59 | + steps: |
| 60 | + - name: Install dependencies |
| 61 | + run: apt-get update && apt-get install -y $BASIC_PACKAGES $MORE_PACKAGES |
| 62 | + - uses: actions/checkout@v4 |
| 63 | + - run: misc/jenkins/ensuregit.sh |
| 64 | + - uses: actions/download-artifact@v4 |
| 65 | + - run: chmod +x bin/* |
| 66 | + - run: make src/version.nit |
| 67 | + - run: cd tests && ./search_tests_git.sh origin/master HEAD > list |
| 68 | + - run: cd tests && ./tests.sh --engine ${{ matrix.engine }} `cat list` |
| 69 | + - uses: actions/upload-artifact@v4 |
| 70 | + if: success() || failure() |
| 71 | + with: |
| 72 | + path: 'tests/*.xml' |
| 73 | + name: tests-some-${{ matrix.engine }} |
| 74 | + - uses: actions/upload-artifact@v4 |
| 75 | + if: success() || failure() |
| 76 | + with: |
| 77 | + path: 'tests/out' |
| 78 | + name: tests-some-${{ matrix.engine }}-res |
| 79 | + - uses: EnricoMi/publish-unit-test-result-action@v2 |
| 80 | + if: success() || failure() |
| 81 | + with: |
| 82 | + files: "tests/*.xml" |
| 83 | + comment_mode: off |
| 84 | + check_name: tests-some (${{ matrix.engine }}) Results |
| 85 | + |
| 86 | + tests-full: |
| 87 | + runs-on: ubuntu-24.04 |
| 88 | + needs: [build, tests-some] |
| 89 | + container: "ubuntu:24.04" |
| 90 | + services: |
| 91 | + postgres: |
| 92 | + image: postgres |
| 93 | + env: |
| 94 | + POSTGRES_HOST_AUTH_METHOD: trust |
| 95 | + mongo: |
| 96 | + image: mongo |
| 97 | + neo4j: |
| 98 | + image: 'neo4j:2.3' |
| 99 | + env: |
| 100 | + NEO4J_AUTH: none |
| 101 | + strategy: |
| 102 | + fail-fast: false |
| 103 | + matrix: |
| 104 | + engine: [nitcg, nitcs, nitcsg, nitce, niti] |
| 105 | + steps: |
| 106 | + - name: Install dependencies |
| 107 | + run: apt-get update && apt-get install -y $BASIC_PACKAGES $MORE_PACKAGES |
| 108 | + - uses: actions/checkout@v4 |
| 109 | + - run: misc/jenkins/ensuregit.sh |
| 110 | + - uses: actions/download-artifact@v4 |
| 111 | + - run: chmod +x bin/* |
| 112 | + - run: make src/version.nit |
| 113 | + - name: Run tests |
| 114 | + run: cd tests && ./testfull.sh --engine ${{ matrix.engine }} |
| 115 | + - uses: actions/upload-artifact@v4 |
| 116 | + if: success() || failure() |
| 117 | + with: |
| 118 | + path: 'tests/*.xml' |
| 119 | + name: tests-full-${{ matrix.engine }} |
| 120 | + - uses: actions/upload-artifact@v4 |
| 121 | + if: success() || failure() |
| 122 | + with: |
| 123 | + path: 'tests/out' |
| 124 | + name: tests-full-${{ matrix.engine }}-res |
| 125 | + - uses: EnricoMi/publish-unit-test-result-action@v2 |
| 126 | + if: success() || failure() |
| 127 | + with: |
| 128 | + files: "tests/*.xml" |
| 129 | + comment_mode: off |
| 130 | + check_name: tests-full (${{ matrix.engine }}) Results |
| 131 | + |
| 132 | + nitunit-some: |
| 133 | + runs-on: ubuntu-24.04 |
| 134 | + needs: [build] |
| 135 | + container: "ubuntu:24.04" |
| 136 | + services: |
| 137 | + postgres: |
| 138 | + image: postgres |
| 139 | + env: |
| 140 | + POSTGRES_HOST_AUTH_METHOD: trust |
| 141 | + mongo: |
| 142 | + image: mongo |
| 143 | + neo4j: |
| 144 | + image: 'neo4j:2.3' |
| 145 | + env: |
| 146 | + NEO4J_AUTH: none |
| 147 | + steps: |
| 148 | + - name: Install dependencies |
| 149 | + run: apt-get update && apt-get install -y $BASIC_PACKAGES $MORE_PACKAGES |
| 150 | + - uses: actions/checkout@v4 |
| 151 | + - run: misc/jenkins/ensuregit.sh |
| 152 | + - uses: actions/download-artifact@v4 |
| 153 | + - run: chmod +x bin/* |
| 154 | + - run: make nitunit-some |
| 155 | + - uses: actions/upload-artifact@v4 |
| 156 | + if: success() || failure() |
| 157 | + with: |
| 158 | + path: '*.xml' |
| 159 | + name: nitunit-some |
| 160 | + - uses: EnricoMi/publish-unit-test-result-action@v2 |
| 161 | + if: success() || failure() |
| 162 | + with: |
| 163 | + files: "*.xml" |
| 164 | + comment_mode: off |
| 165 | + check_name: 'nitunit-some Results' |
| 166 | + |
| 167 | + nitunit-full: |
| 168 | + runs-on: ubuntu-24.04 |
| 169 | + needs: [build, nitunit-some] |
| 170 | + container: "ubuntu:24.04" |
| 171 | + services: |
| 172 | + postgres: |
| 173 | + image: postgres |
| 174 | + env: |
| 175 | + POSTGRES_HOST_AUTH_METHOD: trust |
| 176 | + mongo: |
| 177 | + image: mongo |
| 178 | + neo4j: |
| 179 | + image: 'neo4j:2.3' |
| 180 | + env: |
| 181 | + NEO4J_AUTH: none |
| 182 | + steps: |
| 183 | + - uses: actions/checkout@v4 |
| 184 | + - name: Install dependencies |
| 185 | + run: apt-get update && apt-get install -y $BASIC_PACKAGES $MORE_PACKAGES |
| 186 | + - uses: actions/download-artifact@v4 |
| 187 | + - run: chmod +x bin/* |
| 188 | + - run: make nitunit-full |
| 189 | + - uses: actions/upload-artifact@v4 |
| 190 | + if: success() || failure() |
| 191 | + with: |
| 192 | + path: '*.xml' |
| 193 | + name: nitunit-full |
| 194 | + - uses: EnricoMi/publish-unit-test-result-action@v2 |
| 195 | + if: success() || failure() |
| 196 | + with: |
| 197 | + files: "*.xml" |
| 198 | + comment_mode: off |
| 199 | + check_name: 'nitunit-full Results' |
| 200 | + |
| 201 | + test-contrib: |
| 202 | + runs-on: ubuntu-24.04 |
| 203 | + needs: [build] |
| 204 | + steps: |
| 205 | + - uses: actions/checkout@v4 |
| 206 | + - name: Install dependencies |
| 207 | + run: sudo apt-get update && sudo apt-get install -y $BASIC_PACKAGES $MORE_PACKAGES |
| 208 | + - uses: actions/download-artifact@v4 |
| 209 | + - run: chmod +x bin/* |
| 210 | + - run: 'PATH=$PWD/bin:$PATH make test-contrib' |
| 211 | + - uses: actions/upload-artifact@v4 |
| 212 | + if: success() || failure() |
| 213 | + with: |
| 214 | + path: '*.xml' |
| 215 | + name: test-contrib |
| 216 | + - uses: EnricoMi/publish-unit-test-result-action@v2 |
| 217 | + if: success() || failure() |
| 218 | + with: |
| 219 | + files: "*.xml" |
| 220 | + comment_mode: off |
| 221 | + check_name: 'test-contrib Results' |
| 222 | + |
| 223 | + bootstrap-full: |
| 224 | + runs-on: ubuntu-24.04 |
| 225 | + steps: |
| 226 | + - uses: actions/checkout@v4 |
| 227 | + - name: Install dependencies |
| 228 | + run: sudo apt-get update && sudo apt-get install -y $BASIC_PACKAGES |
| 229 | + - run: make bootstrap-full |
| 230 | + |
| 231 | + bench-fast: |
| 232 | + runs-on: ubuntu-24.04 |
| 233 | + needs: [build] |
| 234 | + steps: |
| 235 | + - uses: actions/checkout@v4 |
| 236 | + - name: Install dependencies |
| 237 | + run: sudo apt-get update && sudo apt-get install -y $BASIC_PACKAGES gnuplot |
| 238 | + - uses: actions/download-artifact@v4 |
| 239 | + - run: chmod +x bin/* |
| 240 | + - run: 'PATH=$PWD/bin:$PATH make bench-fast' |
| 241 | + - uses: actions/upload-artifact@v4 |
| 242 | + if: success() || failure() |
| 243 | + with: |
| 244 | + path: |- |
| 245 | + benchmarks/*.dat |
| 246 | + benchmarks/*.gnu |
| 247 | + benchmarks/*.png |
| 248 | + benchmarks/*.html |
| 249 | + name: bench-fast |
| 250 | + |
| 251 | + valgrind: |
| 252 | + runs-on: ubuntu-24.04 |
| 253 | + needs: [build] |
| 254 | + steps: |
| 255 | + - uses: actions/checkout@v4 |
| 256 | + - name: Install dependencies |
| 257 | + run: sudo apt-get update && sudo apt-get install -y $BASIC_PACKAGES valgrind |
| 258 | + - uses: actions/download-artifact@v4 |
| 259 | + - run: chmod +x bin/* |
| 260 | + - run: make valgrind |
| 261 | + - uses: actions/upload-artifact@v4 |
| 262 | + if: success() || failure() |
| 263 | + with: |
| 264 | + path: 'valgrind.out' |
| 265 | + name: valgrind |
| 266 | + |
| 267 | + info: |
| 268 | + runs-on: ubuntu-24.04 |
| 269 | + steps: |
| 270 | + - uses: actions/checkout@v4 |
| 271 | + - run: pwd |
| 272 | + - run: id |
| 273 | + - run: ls -al |
| 274 | + - run: git branch -av || true |
| 275 | + - run: lscpu || true |
| 276 | + - run: git log --oneline --graph --decorate | head -n 50 |
| 277 | + - run: cat /etc/issue |
| 278 | + - run: cat /etc/os-release |
| 279 | + - run: env |
0 commit comments