Skip to content

Commit

Permalink
Simplify the installation process (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
yutaro-sakamoto authored Oct 22, 2023
1 parent 8f85a61 commit 7b6b172
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 28 deletions.
11 changes: 2 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ env:
COBOL4J_LIB_DIR: /usr/lib/opensourcecobol4j
COBOL4J_LIBCOBJ_JAR_PATH: /usr/lib/opensourcecobol4j/libcobj.jar
OCESQL4J_LIB_DIR: /usr/lib/Open-COBOL-ESQL-4j
OCESQL4J_POSTGRESQL_JDBC_PATH: /usr/lib/Open-COBOL-ESQL-4j/postgresql.jar
OCESQL4J_OCESQL4J_JAR_PATH: /usr/lib/Open-COBOL-ESQL-4j/ocesql4j.jar
CLASSPATH: ":/usr/lib/opensourcecobol4j/libcobj.jar:/usr/lib/Open-COBOL-ESQL-4j/postgresql.jar:/usr/lib/Open-COBOL-ESQL-4j/ocesql4j.jar"
CLASSPATH: ":/usr/lib/Open-COBOL-ESQL-4j/ocesql4j.jar"


jobs:
Open-COBOL-ESQL-4j-tests:
Expand Down Expand Up @@ -90,12 +90,6 @@ jobs:
# Checkout
- name: Checkout Open-COBOL-ESQL-4j
uses: actions/checkout@v3

# Install JDBC
- name: Install JDBC
run: |
mkdir -p $COBOL4J_LIB_DIR $OCESQL4J_LIB_DIR
curl -L -o $OCESQL4J_POSTGRESQL_JDBC_PATH https://jdbc.postgresql.org/download/postgresql-42.2.24.jre6.jar

# Checkout opensource COBOL 4J
- name: Checkout opensourcecobol 4J
Expand All @@ -115,7 +109,6 @@ jobs:
# Build and Install Open COBOL ESQL 4J
- name: Install Open COBOL ESQL 4J
run: |
cp $OCESQL4J_POSTGRESQL_JDBC_PATH dblibj/lib
cp $COBOL4J_LIBCOBJ_JAR_PATH dblibj/lib
sh configure --prefix=/usr/
make
Expand Down
12 changes: 2 additions & 10 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Make a coverage report
name: Coverage

on:
push:
Expand All @@ -10,9 +10,8 @@ env:
COBOL4J_LIB_DIR: /usr/lib/opensourcecobol4j
COBOL4J_LIBCOBJ_JAR_PATH: /usr/lib/opensourcecobol4j/libcobj.jar
OCESQL4J_LIB_DIR: /usr/lib/Open-COBOL-ESQL-4j
OCESQL4J_POSTGRESQL_JDBC_PATH: /usr/lib/Open-COBOL-ESQL-4j/postgresql.jar
OCESQL4J_OCESQL4J_JAR_PATH: /usr/lib/Open-COBOL-ESQL-4j/ocesql4j.jar
CLASSPATH: ":/usr/lib/opensourcecobol4j/sqlite.jar:/usr/lib/opensourcecobol4j/libcobj.jar:/usr/lib/Open-COBOL-ESQL-4j/postgresql.jar:/usr/lib/Open-COBOL-ESQL-4j/ocesql4j.jar"
CLASSPATH: ":/usr/lib/Open-COBOL-ESQL-4j/ocesql4j.jar"

jobs:
make-coverage-report:
Expand Down Expand Up @@ -58,12 +57,6 @@ jobs:
# Checkout
- name: Checkout Open-COBOL-ESQL-4j
uses: actions/checkout@v3

# Install JDBC
- name: Install JDBC
run: |
sudo mkdir -p $COBOL4J_LIB_DIR $OCESQL4J_LIB_DIR
sudo curl -L -o $OCESQL4J_POSTGRESQL_JDBC_PATH https://jdbc.postgresql.org/download/postgresql-42.2.24.jre6.jar

# Checkout opensource COBOL 4J
- name: Checkout opensourcecobol 4J
Expand All @@ -83,7 +76,6 @@ jobs:
# Build and Install Open COBOL ESQL 4J
- name: Install Open COBOL ESQL 4J
run: |
cp $OCESQL4J_POSTGRESQL_JDBC_PATH dblibj/lib
cp $COBOL4J_LIBCOBJ_JAR_PATH dblibj/lib
sh configure CFLAGS='-fprofile-arcs -ftest-coverage' --prefix=/usr/
make
Expand Down
3 changes: 1 addition & 2 deletions dblibj/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ SETTING_FILES = \
scalastyle-config.xml

JAR_DEPENDENCIES = \
lib/libcobj.jar \
lib/postgresql.jar
lib/libcobj.jar

TARGET_JAR = target/scala-2.13/ocesql4j.jar

Expand Down
3 changes: 1 addition & 2 deletions dblibj/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,7 @@ SETTING_FILES = \
scalastyle-config.xml

JAR_DEPENDENCIES = \
lib/libcobj.jar \
lib/postgresql.jar
lib/libcobj.jar

TARGET_JAR = target/scala-2.13/ocesql4j.jar
all: all-am
Expand Down
7 changes: 2 additions & 5 deletions dblibj/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ version := "0.1"

scalaVersion := "2.13.6"

val scalaTest = "org.scalatest" %% "scalatest" % "3.0.8" % Test

unmanagedJars in Compile += file("lib/postgresql-42.2.24.jre6.jar")

libraryDependencies ++= Seq(
scalaTest
"org.scalatest" %% "scalatest" % "3.0.8" % Test,
"org.postgresql" % "postgresql" % "42.2.5"
)

assemblyJarName := "ocesql4j.jar"
Expand Down

0 comments on commit 7b6b172

Please sign in to comment.