Skip to content

Merge pull request #245 from yutaro-sakamoto/v1.0.16 #373

Merge pull request #245 from yutaro-sakamoto/v1.0.16

Merge pull request #245 from yutaro-sakamoto/v1.0.16 #373

Workflow file for this run

name: test
on:
push:
pull_request:
types: [opened, reopened, review_requested, synchronize]
env:
CLASSPATH: ":/usr/lib/opensourcecobol4j/libcobj.jar"
jobs:
build:
strategy:
matrix:
os: ["ubuntu:22.04", "almalinux:9"]
runs-on: ubuntu-latest
container:
image: ${{ matrix.os }}
steps:
- name: Install dependencies on Ubuntu 22.04
if: matrix.os == 'ubuntu:22.04'
run: |
apt update -y
apt install -y default-jdk build-essential bison flex gettext texinfo automake autoconf
- name: Install dependencies on AlmaLinux 9
if: matrix.os == 'almalinux:9'
run: |
dnf -y update
dnf install -y java-17-openjdk-devel gcc make bison flex automake autoconf diffutils gettext
- name: Checkout opensource COBOL 4J
uses: actions/checkout@v3
- name: Install opensource COBOL 4J
run: |
./configure --prefix=/usr/
make
echo ARTIFACT_NAME=${{ matrix.os }} | sed 's/:/-/g' >> $GITHUB_ENV
- name: Create an artifact file
run: |
cd ../
tar zcf opensourcecobol4j.tar.gz opensourcecobol4j
mv opensourcecobol4j.tar.gz opensourcecobol4j
- name: Upload an artifact
uses: actions/upload-artifact@v3
with:
name: opensourcecobol4j-${{ env.ARTIFACT_NAME }}
path: opensourcecobol4j.tar.gz
run-test-other:
needs: build
strategy:
matrix:
test_name: ["command-line-options", "data-rep", "i18n_sjis", "jp-compat", "run", "syntax"]
uses: ./.github/workflows/test-other.yml
with:
test-name: ${{ matrix.test_name }}
run-test-nist:
needs: build
strategy:
matrix:
test_name: ["IC", "IF", "IX", "NC", "OB", "RL", "SG", "SM", "SQ", "ST"]
uses: ./.github/workflows/test-nist.yml
with:
test-name: ${{ matrix.test_name }}
check-result: true
run-test-nist-extra:
needs: build
strategy:
matrix:
test_name: ["CM", "DB", "RW"]
uses: ./.github/workflows/test-nist.yml
with:
test-name: ${{ matrix.test_name }}
check-result: false
static_analysis:
runs-on: ubuntu-latest
steps:
# Checkout opensource COBOL
- name: Checkout opensource COBOL 4J
uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Install static analysis tools
run: |
sudo apt-get update -y
sudo apt-get install -y clang-format cppcheck
- name: Install opensource COBOL 4J
run: |
sudo apt install -y build-essential bison flex gettext texinfo automake autoconf
./configure --prefix=/usr/
make
sudo make install
- name: Check format with google-java-format and clang-format
run: |
./check-format
- name: Run SpotBugs (ignore results)
run: |
cd libcobj
./gradlew spotbugsMain || true
- name: Run PMD
run: |
cd libcobj
./gradlew pmdMain
- name: Run cppcheck (ignore results)
run: |
cd cobj && cppcheck cobj.c cobj.h codegen.c config.c error.c field.c pplex.c ppparse.c ppparse.h reserved.c tree.c tree.h typeck.c