Skip to content

Commit 01d2f0b

Browse files
authored
Add some actions (#4)
workflows for: - python lint check - charcheck verify - beginning of jsp build code changes: - charcheck: add code to fetch an Ubuntu binary
1 parent 6098d4e commit 01d2f0b

File tree

5 files changed

+120
-0
lines changed

5 files changed

+120
-0
lines changed

.github/workflows/build-charcheck.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Build charcheck
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
# strategy:
10+
# matrix:
11+
# compiler: [gcc, clang]
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v1
19+
- name: Fetch ICU
20+
run: '(cd c/char-check && sh fetch-icu-bin.sh)'
21+
- name: Build
22+
run: '(cd c/char-check && clang++ -o char-check -licuuc -licui18n -licuio -licudata -Wl,-rpath -Wl,`pwd`/icu/usr/local/lib char-check.cpp -L`pwd`/icu/usr/local/lib -I icu/usr/local/include/ && ./char-check ABCD )'
23+
# run: '(cd c/char-check && make ICUBLD=icu/usr/local/ char-check )'

.github/workflows/build-jsp.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
on:
3+
push:
4+
branches-ignore:
5+
- '**'
6+
# TODO: broken, see below
7+
# push:
8+
# branches: [ master ]
9+
# pull_request:
10+
# branches: [ master ]
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-java@v1
17+
with:
18+
java-version: 8 # The JDK version to make available on the path.
19+
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
20+
architecture: x64 # (x64 or x86) - defaults to x64
21+
- run: cd UnicodeJsps && ant war # TODO: broken: needs CATALINA_HOME setup

.github/workflows/pythonpackage.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python package
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: [2.7]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v1
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install dependencies
27+
run: |
28+
cd py/
29+
python -m pip install --upgrade pip
30+
pip install flake8 pytest
31+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
32+
- name: Lint with flake8
33+
run: |
34+
cd py/
35+
# stop the build if there are Python syntax errors or undefined names
36+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
37+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39+
# - name: Test with pytest
40+
# run: |
41+
# pytest

c/char-check/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/icu
2+
/icu_build
3+
*.tgz
4+
/char-check

c/char-check/fetch-icu-bin.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/sh
2+
# This is the original we used ~2015:
3+
#ICU_URL=http://download.icu-project.org/files/icu4c/56.1/icu4c-56_1-RHEL6-x64.tgz
4+
# PREFIX=${HOME}/icu-inst
5+
PREFIX=/usr/local/icu
6+
# ICU_URL=http://download.icu-project.org/files/icu4c/56.1/icu4c-56_1-src.tgz
7+
# ICU_URL=http://download.icu-project.org/files/icu4c/60.2/icu4c-60_2-src.tgz
8+
# ICU_URL=http://download.icu-project.org/files/icu4c/62.1/icu4c-62_1-src.tgz
9+
#ICU_URL=http://download.icu-project.org/files/icu4c/64rc2/icu4c-64rc2-src.tgz
10+
ICU_URL=https://github.com/unicode-org/icu/releases/download/release-66-1/icu4c-66_1-Ubuntu18.04-x64.tgz
11+
ICU_BASE=`basename $ICU_URL`
12+
ICU_BUILD=icu_build
13+
set -x
14+
# rm -rf ./${ICU_BUILD} && mkdir ${ICU_BUILD} || exit 1
15+
wget -c ${ICU_URL} || exit 1
16+
# cd ${ICU_BUILD} || exit 1
17+
tar xfpz ./${ICU_BASE} || exit 1
18+
19+
# export PATH=/usr/local/lib/gcc7/bin/:$PATH
20+
# export LD_LIBRARY_PATH=/usr/local/lib/gcc7/lib64:/usr/local/lib/gcc7/lib:$LD_LIBRARY_PATH
21+
22+
# ( cd icu/source && ./configure --enable-rpath --prefix=${PREFIX} --disable-debug --enable-release --disable-extras --disable-tests && make && make install ) || exit 1
23+
# cd ..
24+
# if [ ! -d pkg-config ];
25+
# then
26+
# git clone git://anongit.freedesktop.org/pkg-config
27+
# else
28+
# (cd pkg-config ; git pull )
29+
# fi
30+
31+

0 commit comments

Comments
 (0)