From 93d47999b284180a678a0ab4fac0b6d440c69d4c Mon Sep 17 00:00:00 2001 From: Fabrice Le Fessant Date: Mon, 16 Jan 2023 23:35:44 +0100 Subject: [PATCH] Add .git and Github files --- .github/workflows/macos.yml | 71 +++++++++++++++++++++++ .github/workflows/ubuntu.yml | 106 ++++++++++++++++++++++++++++++++++ .github/workflows/windows.yml | 70 ++++++++++++++++++++++ .gitignore | 19 ++++++ 4 files changed, 266 insertions(+) create mode 100644 .github/workflows/macos.yml create mode 100644 .github/workflows/ubuntu.yml create mode 100644 .github/workflows/windows.yml create mode 100644 .gitignore diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000..7f95f3a76 --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,71 @@ +name: MacOS Workflow + +on: + pull_request: + branches: [ gnucobol-3.x ] + push: + branches: [ gnucobol-3.x ] + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + + runs-on: ${{ matrix.os }} + + steps: + - name: Configure git + run: git config --global core.symlinks false + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install packages + run: | + brew install automake help2man texinfo bison berkeley-db@4 + opt="/usr/local/opt"; \ + for d in automake help2man bison texinfo berkeley-db@4; do \ + test -d "$opt/$d/bin" && echo "$opt/$d/bin" >> $GITHUB_PATH; \ + test -d "$opt/$d/lib" && export LDFLAGS="-L$opt/$d/lib $LDFLAGS"; \ + test -d "$opt/$d/include" && export CPPFLAGS="-I$opt/$d/include $CPPFLAGS"; \ + done; \ + echo "LDFLAGS=${LDFLAGS}" >> $GITHUB_ENV; \ + echo "CPPFLAGS=${CPPFLAGS}" >> $GITHUB_ENV + + - name: Set git user + run: | + git config --global user.name github-actions + git config --global user.email github-actions-bot@users.noreply.github.com + + - name: bootstrap + run: | + ./autogen.sh + + - name: Build environment setup + run: | + mkdir _build + echo "NPROC=`sysctl -n hw.ncpu`" >> $GITHUB_ENV + + - name: configure + run: | + cd _build + ../configure --enable-cobc-internal-checks --enable-debug --prefix /opt/cobol/gnucobol-gcos --exec-prefix /opt/cobol/gnucobol-gcos + + - name: make + run: | + cd _build + make --jobs=$((${NPROC}+1)) + + - name: check + run: | + cd _build + make check TESTSUITEFLAGS="--jobs=$((${NPROC}+1))" + + - name: install + run: | + cd _build + sudo make install diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml new file mode 100644 index 000000000..e4a084b3d --- /dev/null +++ b/.github/workflows/ubuntu.yml @@ -0,0 +1,106 @@ +name: Ubuntu Workflow + +on: + pull_request: + branches: [ gnucobol-3.x ] + push: + branches: [ gnucobol-3.x ] + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + include: + - os: ubuntu-latest + skip_test: true + + runs-on: ${{ matrix.os }} + + steps: + - name: Configure git + run: git config --global core.symlinks false + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install packages + run: | + sudo apt-get install automake libtool libdb5.3-dev help2man gettext texlive + + - name: Set git user + run: | + git config --global user.name github-actions + git config --global user.email github-actions-bot@users.noreply.github.com + + - name: bootstrap + run: | + ./build_aux/bootstrap + + # FIXME: With TERM="dumb" `make check` fails with: + # ... + # 571: ACCEPT OMITTED (SCREEN) FAILED (run_accept.at:307) + # ... + # 693: ON EXCEPTION clause of DISPLAY FAILED (run_misc.at:6335) + # 695: LINE/COLUMN 0 exceptions FAILED (run_misc.at:6414) + # 694: EC-SCREEN-LINE-NUMBER and -STARTING-COLUMN FAILED (run_misc.at:6376) + # ... + # Failure cases read: "Error opening terminal: unknown." on + # stderr, and exit with code 1. + # + # Another alternative is passing `--with-curses=no` to the + # configure script, yet distcheck does call configure too... + # + - name: Build environment setup + run: | + mkdir _build + export TERM="vt100" + echo "TERM=$TERM" >> $GITHUB_ENV + + - name: configure + run: | + cd _build + ../configure --enable-cobc-internal-checks --enable-debug --prefix /opt/cobol/gnucobol-gcos --exec-prefix /opt/cobol/gnucobol-gcos + + - name: make + run: | + cd _build + make --jobs=$(($(nproc)+1)) + + # - name: check + # run: | + # cd _build + # make check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" + + - name: distcheck + run: | + cd _build + make distcheck TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" + + - name: Cache newcob.val.Z + uses: actions/cache@v3 + id: newcob + with: + path: _build/tests/cobol85/newcob.val.Z.cached + key: newcob + + - name: Download newcob.val.Z + if: steps.newcob.outputs.cache-hit != 'true' + run: | + cd _build/tests/cobol85 + make newcob.val.Z + ln -f newcob.val.Z newcob.val.Z.cached + + - name: NIST85 Test Suite + run: | + cd _build/tests/cobol85 + ln -f newcob.val.Z.cached newcob.val.Z + make EXEC85 && make --jobs=$(($(nproc)+1)) test + + - name: install + run: | + cd _build + make install diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml new file mode 100644 index 000000000..7c380e381 --- /dev/null +++ b/.github/workflows/windows.yml @@ -0,0 +1,70 @@ +name: Windows Workflow + +on: + pull_request: + branches: [ gnucobol-3.x ] + push: + branches: [ gnucobol-3.x ] + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - windows-latest + + runs-on: ${{ matrix.os }} + + steps: + - name: Configure git + run: git config --global core.symlinks false + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install packages + uses: msys2/setup-msys2@v2 + with: + update: true + install: autoconf automake libtool make mingw-w64-x86_64-db mingw-w64-x86_64-gmp libdb-devel mingw-w64-x86_64-gcc flex bison gmp-devel help2man texinfo + + - name: Set git user + run: | + git config --global user.name github-actions + git config --global user.email github-actions-bot@users.noreply.github.com + + - name: bootstrap + run: | + ./build_aux/bootstrap + shell: msys2 {0} + + - name: Build environment setup + run: | + mkdir _build + shell: msys2 {0} + + - name: configure + run: | + cd _build + ../configure --enable-cobc-internal-checks --enable-debug --prefix /opt/cobol/gnucobol-gcos --exec-prefix /opt/cobol/gnucobol-gcos + shell: msys2 {0} + + - name: make + run: | + cd _build + make --jobs=$(($(nproc)+1)) + shell: msys2 {0} + + - name: check + run: | + cd _build + make check TESTSUITEFLAGS="--jobs=$(($(nproc)+1))" + shell: msys2 {0} + + - name: install + run: | + cd _build + make install + shell: msys2 {0} diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..d0c03f7b3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +*~ +Makefile.in +/_build +aclocal.m4 +aminclude_static.am +autom4te.cache +config.h.in +/configure +/doc/gnucobol.info +/doc/stamp-vti +/doc/version.texi +/tarstamp.h +/po/*.gmo +/tests/cobol85/newcob.val +/tests/package.m4 +/tests/testsuite +/tests/testsuite.dir/ +/tests/testsuite.log +/tests/testsuite_manual