Skip to content

Commit

Permalink
[No Deploy] opensource COBOL 4Jをビルドできるように変更 (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
yutaro-sakamoto authored Oct 19, 2024
1 parent 5dea9ff commit 1a197de
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/server-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"

- name: Build with Gradle
run: ./gradlew bootRun
run: ./gradlew build

- name: Run tests
if: ${{ github.event.inputs.run_tests }}
Expand Down
4 changes: 1 addition & 3 deletions server/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
compiler_bin
29 changes: 29 additions & 0 deletions server/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
plugins {
id("cpp-application")
}


// opensource COBOL 4J のビルドタスクを追加
tasks.register<Exec>("buildCompiler") {
group = "build"
description = "Build opensource COBOL 4J"

//// 作業ディレクトリを指定
workingDir = file("${project.projectDir}/opensourcecobol4j/")

// 入力ファイルと出力ファイルを指定
inputs.files(fileTree("${project.projectDir}/opensourcecobol4j"))
outputs.file("${project.projectDir}/compiler_bin/lib/opensourcecobol4j/libcobj.jar")

// 実行コマンドを指定
commandLine("sh", "-c", """
mkdir -p ${project.projectDir}/compiler_bin &&
./configure --prefix=${project.projectDir}/compiler_bin &&
make &&
make install
""".trimIndent())
}

tasks.named("build").configure {
dependsOn("buildCompiler")
}

0 comments on commit 1a197de

Please sign in to comment.