diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b85fd3d..8e81e21 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,12 +6,22 @@ on: types: [opened, reopened, review_requested, synchronize] jobs: - run-tests: + build: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build a docker image run: docker build -t opensourcecobol/opensourcecobol4j . + + utf8-build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Build a docker image + run: docker build -t opensourcecobol/opensourcecobol4j:utf8 . -f utf8.Dockerfile \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 99e8a19..1caefea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,13 +15,13 @@ RUN curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x8 # install opensourcecobol4j RUN cd /root &&\ - curl -L -o opensourcecobol4j-v1.1.5.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.5.tar.gz &&\ - tar zxvf opensourcecobol4j-v1.1.5.tar.gz &&\ - cd opensourcecobol4j-1.1.5 &&\ + curl -L -o opensourcecobol4j-v1.1.6.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.6.tar.gz &&\ + tar zxvf opensourcecobol4j-v1.1.6.tar.gz &&\ + cd opensourcecobol4j-1.1.6 &&\ ./configure --prefix=/usr/ &&\ make &&\ make install &&\ - rm /root/opensourcecobol4j-v1.1.5.tar.gz + rm /root/opensourcecobol4j-v1.1.6.tar.gz # Install Open COBOL ESQL 4J ENV PATH="$PATH:/root/.local/share/coursier/bin" diff --git a/README.md b/README.md index 915b99c..fc08284 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Versions : - OS: Ubuntu -- opensource COBOL 4J: v1.1.5 +- opensource COBOL 4J: v1.1.6 - Open COBOL ESQL 4J: v1.1.1 In order to "Hello World" program, run the following commands in the docker container diff --git a/utf8.Dockerfile b/utf8.Dockerfile new file mode 100644 index 0000000..657aff3 --- /dev/null +++ b/utf8.Dockerfile @@ -0,0 +1,32 @@ +FROM almalinux:9 + +SHELL ["/bin/bash", "-c"] + +# classpath settings +ENV CLASSPATH=:/usr/lib/opensourcecobol4j/libcobj.jar +RUN echo 'export CLASSPATH=:/usr/lib/opensourcecobol4j/libcobj.jar' >> ~/.bashrc + +# install dependencies +RUN dnf update -y +RUN dnf install -y gcc make bison flex automake autoconf diffutils gettext java-11-openjdk-devel + +# install sbt +RUN curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-pc-linux.gz | gzip -d > cs && chmod +x cs && echo Y | ./cs setup + +# install opensourcecobol4j +RUN cd /root &&\ + curl -L -o opensourcecobol4j-v1.1.6.tar.gz https://github.com/opensourcecobol/opensourcecobol4j/archive/refs/tags/v1.1.6.tar.gz &&\ + tar zxvf opensourcecobol4j-v1.1.6.tar.gz &&\ + cd opensourcecobol4j-1.1.6 &&\ + ./configure --prefix=/usr/ --enable-utf8 &&\ + touch cobj/*.m4 &&\ + make &&\ + make install &&\ + rm /root/opensourcecobol4j-v1.1.6.tar.gz + +# add sample programs +ADD cobol_sample /root/cobol_sample + +WORKDIR /root/ + +CMD ["/bin/bash"]