forked from snowballstem/snowball
-
Notifications
You must be signed in to change notification settings - Fork 0
170 lines (159 loc) · 6.16 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name: CI
on:
push:
paths-ignore:
- '*.rst'
- NEWS
pull_request:
branches: master
paths-ignore:
- '*.rst'
- NEWS
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
##env:
##global: MAKE=make
##dist: xenial
jobs:
build:
strategy:
matrix:
include:
- name: "C distribution build"
CFLAGS_DIST_BUILD: '-O2 -Wall -W -std=c90 -Wdeclaration-after-statement -Werror'
- name: "C distribution build (clang)"
CFLAGS_DIST_BUILD: '-O2 -Wall -W -std=c90 -Wdeclaration-after-statement -Werror'
CC: clang
- name: "C"
c_tests: y
CFLAGS: '-O2 -Wall -W -std=c99 -Werror'
- name: "C (clang)"
c_tests: y
CFLAGS: '-O2 -Wall -W -std=c99 -Werror'
CC: clang
- name: java
JAVA: java
JAVAC: javac
- name: go
# 20.04: golang-1.13 14 16 18 20
# 22.04: golang-1.13 17 18 20
GO: go
# - language: node_js
# node_js: "node"
# env: NODE=node
# dist: focal # seems to be needed for working node
# - language: rust
# rust:
# - stable
# - beta
# dist: bionic
# env: RUST=rust
# - language: csharp
# arch: amd64 # csharp doesn't seem to work on arm64
# env: MCS=mcs
# dist: bionic
# - name: Pascal
# env: FPC=fpc
# dist: bionic
# addons:
# apt:
# packages:
# - fpc
# # The pure Python versions run slowly so we need to thin the testdata
# # for languages such as Arabic where there's a lot, or else the build
# # hits the travis time limit. With pypy, it's enough faster than we
# # can run the full tests.
# - language: python
# python: "3.9"
# env: PYTHON=python THIN_FACTOR=10
# - language: python
# python: "3.7"
# env: PYTHON=python THIN_FACTOR=10
# - language: python
# python: "3.6"
# env: PYTHON=python THIN_FACTOR=10
# - language: python
# python: "pypy3.7-7.3.5"
# env: PYTHON=python
# dist: bionic
# - name: "Ada"
# env: gprbuild=gprbuild
# dist: bionic
# addons:
# apt:
# packages:
# - gnat
# - gprbuild
# - os: windows
# language: c
# env: c_tests=y MAKE=mingw32-make
# - os: windows
# language: go
# env: GO=go MAKE=mingw32-make
fail-fast: false
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
#env:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout data
run: |
# Try to check out a branch of the same name from the snowball-data
# repo sibling of this snowball repo, so that PRs requiring changes to
# both can be CI tested easily.
#
# If that fails, just use the standard snowball-data repo's default
# branch.
git status
echo "${{ github }}"
# GH_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
# - GH_REPO_SLUG=${TRAVIS_PULL_REQUEST_SLUG:-$TRAVIS_REPO_SLUG}
# - GH_REPO_URL=https://github.com/${GH_REPO_SLUG%%/*}/snowball-data.git
# - echo "Trying branch $GH_BRANCH from $GH_REPO_URL"
# - git clone --depth=1 -b "$GH_BRANCH" "$GH_REPO_URL" || git clone --depth=1 https://github.com/snowballstem/snowball-data.git
- name: Install CCache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.name }}
#script:
# # Ensure CC is set for building the compiler in non-C builds.
# - test -n "$CC" || export CC=gcc
# - $MAKE CC="$CC"
# - test -z "$CFLAGS_DIST_BUILD" || { pip install setuptools && $MAKE dist && mkdir tmp && cd tmp && tar xf ../dist/libstemmer_c-*.tar.gz && cd libstemmer_c-* && $MAKE CFLAGS="$CFLAGS_DIST_BUILD" ; }
# - test -z "$c_tests" || $MAKE check CC="$CC" STEMMING_DATA=snowball-data
# - test -z "$PYTHON" || $MAKE check_python python="$PYTHON" STEMMING_DATA=snowball-data
# - test -z "$JAVA" -o -z "$JAVAC" || $MAKE check_java STEMMING_DATA=snowball-data
# - test -z "$MCS" || $MAKE check_csharp MCS="$MCS" STEMMING_DATA=snowball-data
# - test -z "$NODE" || $MAKE check_js STEMMING_DATA=snowball-data
# - test -z "$RUST" || $MAKE check_rust STEMMING_DATA=snowball-data
# - test -z "$RUST" || $MAKE check_rust STEMMING_DATA=snowball-data
# - test -z "$GO" || $MAKE check_go STEMMING_DATA=snowball-data
# - test -z "$FPC" || $MAKE check_pascal STEMMING_DATA=snowball-data
# - test -z "$gprbuild" || $MAKE check_ada STEMMING_DATA=snowball-data
#before_install:
# # Try to check out a branch of the same name from the snowball-data repo
# # sibling of this snowball repo, so that PRs requiring changes to both can be
# # CI tested easily.
# #
# # If that fails, just use the standard snowball-data repo's default branch.
# - GH_BRANCH=${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH}
# - GH_REPO_SLUG=${TRAVIS_PULL_REQUEST_SLUG:-$TRAVIS_REPO_SLUG}
# - GH_REPO_URL=https://github.com/${GH_REPO_SLUG%%/*}/snowball-data.git
# - echo "Trying branch $GH_BRANCH from $GH_REPO_URL"
# - git clone --depth=1 -b "$GH_BRANCH" "$GH_REPO_URL" || git clone --depth=1 https://github.com/snowballstem/snowball-data.git
#
#script:
# # Ensure CC is set for building the compiler in non-C builds.
# - test -n "$CC" || export CC=gcc
# - $MAKE CC="$CC"
# - test -z "$CFLAGS_DIST_BUILD" || { pip install setuptools && $MAKE dist && mkdir tmp && cd tmp && tar xf ../dist/libstemmer_c-*.tar.gz && cd libstemmer_c-* && $MAKE CFLAGS="$CFLAGS_DIST_BUILD" ; }
# - test -z "$c_tests" || $MAKE check CC="$CC" STEMMING_DATA=snowball-data
# - test -z "$PYTHON" || $MAKE check_python python="$PYTHON" STEMMING_DATA=snowball-data
# - test -z "$JAVA" -o -z "$JAVAC" || $MAKE check_java STEMMING_DATA=snowball-data
# - test -z "$MCS" || $MAKE check_csharp MCS="$MCS" STEMMING_DATA=snowball-data
# - test -z "$NODE" || $MAKE check_js STEMMING_DATA=snowball-data
# - test -z "$RUST" || $MAKE check_rust STEMMING_DATA=snowball-data
# - test -z "$RUST" || $MAKE check_rust STEMMING_DATA=snowball-data
# - test -z "$GO" || $MAKE check_go STEMMING_DATA=snowball-data
# - test -z "$FPC" || $MAKE check_pascal STEMMING_DATA=snowball-data
# - test -z "$gprbuild" || $MAKE check_ada STEMMING_DATA=snowball-data