Skip to content

Commit

Permalink
Merge branch 'master' into optscript-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
masatake committed Dec 28, 2022
2 parents da2777b + 50e7a74 commit eedee15
Show file tree
Hide file tree
Showing 1,765 changed files with 122,004 additions and 14,639 deletions.
14 changes: 8 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,39 @@ insert_final_newline = true
indent_size = 4
indent_style = tab
trim_trailing_whitespace = true
tab_width = 4

[misc/packcc/packcc.c]
indent_size = 4
indent_style = space
trim_trailing_whitespace = true
tab_width = 4

[*.{ctags,ps}]
indent_size = 4
indent_style = space
trim_trailing_whitespace = true
tab_width = 4

[*.mak]
[{Makefile*,*.mak}]
indent_size = 8
indent_style = tab
trim_trailing_whitespace = true
tab_width = 8

[*.rst*]
indent_size = 4
indent_style = tab
trim_trailing_whitespace = true
tab_width = 4

[fnmatch/*.{c,h}]
tab_width = 8

[gnu_regex/*.{c,h}]
[gnulib/*.{c,h}]
tab_width = 8

[misc/optlib2c]
trim_trailing_whitespace = true

[win32/*]
[win32/*.{bat,sln,vcxproj,vcxproj.filters}]
end_of_line = crlf

[win32/*.vcxproj*]
Expand Down
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* text=auto

/win32/*.bat text eol=crlf
/win32/*.sln text eol=crlf
/win32/*.vcxproj text eol=crlf
/win32/*.vcxproj.filters text eol=crlf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: cross compile with android-ndk
name: cross compile with android-ndk on mac

on:
push:
Expand All @@ -11,62 +11,69 @@ jobs:
strategy:
fail-fast: false
matrix:
build-machine-os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, macos-10.15]
build-machine-os: [macos-12, macos-11]

runs-on: ${{ matrix.build-machine-os }}

steps:
- uses: actions/checkout@v2

- run: brew install gcc make automake autoconf file

- run: ./autogen.sh

- name: Run ./configure ...
run: |
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#environment-variables-3
[ -n "$ANDROID_NDK_LATEST_HOME" ] && {
export ANDROID_NDK_HOME="$ANDROID_NDK_LATEST_HOME"
export ANDROID_NDK_ROOT="$ANDROID_NDK_LATEST_HOME"
}
BUILD_MACHINE_OS_TYPE=$(uname | tr A-Z a-z)
BUILD_MACHINE_OS_ARCH=$(uname -m)
TOOLCHAIN_BASE_DIR=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/$BUILD_MACHINE_OS_TYPE-$BUILD_MACHINE_OS_ARCH
TOOLCHAIN_BIN_DIR=$TOOLCHAIN_BASE_DIR/bin
SYSROOT=$TOOLCHAIN_BASE_DIR/sysroot
export CC=$TOOLCHAIN_BIN_DIR/armv7a-linux-androideabi21-clang
export AR=$TOOLCHAIN_BIN_DIR/arm-linux-androideabi-ar
export RANLIB=$TOOLCHAIN_BIN_DIR/arm-linux-androideabi-ranlib
export AR=$TOOLCHAIN_BIN_DIR/llvm-ar
export RANLIB=$TOOLCHAIN_BIN_DIR/llvm-ranlib
export CFLAGS="--sysroot $SYSROOT -Qunused-arguments -Os -fpic"
export CPPFLAGS="--sysroot $SYSROOT -Qunused-arguments"
export LDFLAGS="--sysroot $SYSROOT"
TARGET=armv7a-linux-androideabi
COLOR_PURPLE='\033[0;35m' # Purple
COLOR_GREEN='\033[0;32m' # Green
COLOR_OFF='\033[0m' # Reset
echo() {
printf "%b\n" "$*"
}
run() {
echo "$COLOR_PURPLE==>$COLOR_OFF $COLOR_GREEN$@$COLOR_OFF"
eval "$*"
}
run ./configure \
--host=$TARGET \
--disable-iconv \
--disable-xml \
--disable-json \
--disable-yaml \
--disable-pcre2 \
CC="$CC" \
CFLAGS="\"$CFLAGS\"" \
CPPFLAGS="\"$CPPFLAGS\"" \
LDFLAGS="\"$LDFLAGS\"" \
AR=$AR \
RANLIB=$RANLIB
- run: make V=1
- run: file ctags | grep 'ELF 32-bit LSB shared object, ARM, EABI5'

- run: file ctags | grep 'ELF 32-bit LSB pie executable, ARM, EABI5'
81 changes: 81 additions & 0 deletions .github/workflows/cross-compile-android-ndk-on-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: cross compile with android-ndk on ubuntu

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
cross-compile:
strategy:
fail-fast: false
matrix:
build-machine-os: [ubuntu-22.04, ubuntu-20.04]

runs-on: ${{ matrix.build-machine-os }}

steps:
- uses: actions/checkout@v2

- run: sudo apt-get -y -o APT::Immediate-Configure=false update
- run: sudo apt-get -y -o APT::Immediate-Configure=false install gcc make automake autoconf file

- run: ./autogen.sh

- name: Run ./configure ...
run: |
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#environment-variables-3
[ -n "$ANDROID_NDK_LATEST_HOME" ] && {
export ANDROID_NDK_HOME="$ANDROID_NDK_LATEST_HOME"
export ANDROID_NDK_ROOT="$ANDROID_NDK_LATEST_HOME"
}
BUILD_MACHINE_OS_TYPE=$(uname | tr A-Z a-z)
BUILD_MACHINE_OS_ARCH=$(uname -m)
TOOLCHAIN_BASE_DIR=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/$BUILD_MACHINE_OS_TYPE-$BUILD_MACHINE_OS_ARCH
TOOLCHAIN_BIN_DIR=$TOOLCHAIN_BASE_DIR/bin
SYSROOT=$TOOLCHAIN_BASE_DIR/sysroot
export CC=$TOOLCHAIN_BIN_DIR/armv7a-linux-androideabi21-clang
export AR=$TOOLCHAIN_BIN_DIR/llvm-ar
export RANLIB=$TOOLCHAIN_BIN_DIR/llvm-ranlib
export CFLAGS="--sysroot $SYSROOT -Qunused-arguments -Os -fpic"
export CPPFLAGS="--sysroot $SYSROOT -Qunused-arguments"
export LDFLAGS="--sysroot $SYSROOT"
TARGET=armv7a-linux-androideabi
COLOR_PURPLE='\033[0;35m' # Purple
COLOR_GREEN='\033[0;32m' # Green
COLOR_OFF='\033[0m' # Reset
echo() {
printf "%b\n" "$*"
}
run() {
echo "$COLOR_PURPLE==>$COLOR_OFF $COLOR_GREEN$@$COLOR_OFF"
eval "$*"
}
run ./configure \
--host=$TARGET \
--disable-iconv \
--disable-xml \
--disable-json \
--disable-yaml \
--disable-pcre2 \
CC="$CC" \
CFLAGS="\"$CFLAGS\"" \
CPPFLAGS="\"$CPPFLAGS\"" \
LDFLAGS="\"$LDFLAGS\"" \
AR=$AR \
RANLIB=$RANLIB
- run: make V=1

# pie executable or shared object
- run: file ctags | grep 'ELF 32-bit LSB .*, ARM, EABI5'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: cross compile with mingw-w64
name: cross compile with mingw-w64 on mac

on:
push:
Expand All @@ -11,14 +11,14 @@ jobs:
strategy:
fail-fast: false
matrix:
build-machine-os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04, macos-10.15]
build-machine-os: [macos-12, macos-11]
target: [i686-w64-mingw32,x86_64-w64-mingw32]

runs-on: ${{ matrix.build-machine-os }}

steps:
- uses: actions/checkout@v2

- run: brew install mingw-w64 gcc make automake autoconf file

- run: ./autogen.sh
Expand All @@ -31,12 +31,13 @@ jobs:
--disable-xml \
--disable-json \
--disable-yaml \
--disable-pcre2 \
CC=${{ matrix.target }}-gcc \
CFLAGS='-v' \
AR=${{ matrix.target }}-ar \
RANLIB=${{ matrix.target }}-ranlib \
WINDRES=${{ matrix.target }}-windres
- run: make V=1

- run: file ctags.exe | grep PE32
44 changes: 44 additions & 0 deletions .github/workflows/cross-compile-mingw-w64-on-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: cross compile with mingw-w64 on ubuntu

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
cross-compile:
strategy:
fail-fast: false
matrix:
build-machine-os: [ubuntu-22.04, ubuntu-20.04]
target: [i686-w64-mingw32,x86_64-w64-mingw32]

runs-on: ${{ matrix.build-machine-os }}

steps:
- uses: actions/checkout@v2

- run: sudo apt-get -y -o APT::Immediate-Configure=false update
- run: sudo apt-get -y -o APT::Immediate-Configure=false install mingw-w64 gcc make automake autoconf file

- run: ./autogen.sh

- name: Run ./configure ...
run: |
./configure \
--host=${{ matrix.target }} \
--disable-iconv \
--disable-xml \
--disable-json \
--disable-yaml \
--disable-pcre2 \
CC=${{ matrix.target }}-gcc \
CFLAGS='-v' \
AR=${{ matrix.target }}-ar \
RANLIB=${{ matrix.target }}-ranlib \
WINDRES=${{ matrix.target }}-windres
- run: make V=1

- run: file ctags.exe | grep PE32
50 changes: 50 additions & 0 deletions .github/workflows/run-citre-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Citre (https://github.com/universal-ctags/citre) is a readtags frontend for
# Emacs. This workflow runs unit tests of Citre to make sure changes in
# readtags doesn't break the behavior that Citre expects.

# Ref: https://github.com/universal-ctags/citre/issues/58#issuecomment-846229409

name: run Citre tests on GNU/Linux

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
testing:
runs-on: ubuntu-latest

env:
CC: gcc
READTAGS: '${{ github.workspace }}/readtags'

steps:
- uses: actions/checkout@v2
- name: update package information
run: sudo apt-get -y -o APT::Immediate-Configure=false update
- name: install tools and libraries
run: sudo apt-get -y -o APT::Immediate-Configure=false install pkg-config automake libjansson-dev libyaml-dev libseccomp-dev libxml2-dev
- name: autogen.sh
run: ./autogen.sh
- name: report the version of cc
run: $CC --version
- name: report the version of make
run: make --version
- name: configure
run: ./configure
- name: make
run: make
- name: report features
run: ./ctags --list-features
- name: install Emacs
run: sudo apt-get -y -o APT::Immediate-Configure=false install emacs
- name: checkout Citre repo
uses: actions/checkout@v2
with:
repository: 'universal-ctags/citre'
path: 'citre'
- name: run Citre unit tests for tags backend
working-directory: 'citre'
run: make test-tags
7 changes: 5 additions & 2 deletions .github/workflows/testing-alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
tag: ['3.10','3.11','3.12','3.13']
tag: ['3.15','3.14','3.12','3.13']

runs-on: ubuntu-20.04

Expand All @@ -20,6 +20,9 @@ jobs:
steps:
- run: apk add libc-dev gcc make automake autoconf pkgconf python3 file diffutils git

# this is to fix https://github.com/actions/checkout/issues/760
- run: git config --global --add safe.directory /__w/ctags/ctags

- uses: actions/checkout@v2

- run: cc --version
Expand All @@ -30,5 +33,5 @@ jobs:
- run: make install
- run: file /usr/bin/ctags
- run: ctags --version
- run: make check V=1 APPVEYOR=1
- run: make check V=1
- run: make roundtrip
Loading

0 comments on commit eedee15

Please sign in to comment.