[ci] Work towards setting up GHA #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
# - 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 | |
git remote -v | |
env|sort | |
# 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 |