-
Couldn't load subscription status.
- Fork 26
Enable GnuCOBOL in workflow file #148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
tsh-hashimoto
wants to merge
10
commits into
opensourcecobol:develop
Choose a base branch
from
tsh-hashimoto:enable-gnucobol
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
282b917
ci: add test-gnucobol.yml
tsh-hashimoto ec2f1f6
ci: fix test-gnucobol.yml
tsh-hashimoto 30cc5a9
ci: fix test-gnucobol.yml
tsh-hashimoto 33f7910
ci: fix test-gnucobol.yml
tsh-hashimoto e0823f6
ci: fix test-gnucobol.yml
tsh-hashimoto 88782fc
ci: rename test.yml -> test-opensource-cobol.yml
tsh-hashimoto e98d352
ci(test-gnucobol): disable to install dependencies on ubuntu
tsh-hashimoto 94e6a35
ci(test-gnucobol): some fixes
tsh-hashimoto 65cdecc
ci(test-gnucobol): some fixes
tsh-hashimoto 000d584
ci(test-gnucobol): remove duplicated command
tsh-hashimoto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,153 @@ | ||
| name: Open-COBOL-ESQL tests | ||
|
|
||
| on: | ||
| push: | ||
| pull_request: | ||
| types: [opened, reopened, synchronize] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| check-workflows: | ||
| uses: ./.github/workflows/check-workflows.yml | ||
|
|
||
| Open-COBOL-ESQL-tests: | ||
| needs: check-workflows | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| # os: ["ubuntu:24.04", "almalinux:9"] | ||
| os: ["almalinux:9"] | ||
| container: | ||
| image: ${{ matrix.os }} | ||
|
|
||
| # Start PostgreSQL server | ||
| services: | ||
| postgres: | ||
| image: postgres:16 | ||
| ports: | ||
| - 5432:5432 | ||
| env: | ||
| POSTGRES_PASSWORD: password | ||
| POSTGRES_USER: main_user | ||
| POSTGRES_DB: testdb | ||
| POSTGRES_HOST_AUTH_METHOD: 'trust' | ||
| options: >- | ||
| --health-cmd pg_isready | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
|
|
||
| steps: | ||
|
|
||
| # Install dependencies (Ubuntu 24.04) | ||
| # - name: Install dependencies on Ubuntu 24.04 | ||
| # if: matrix.os == 'ubuntu:24.04' | ||
| # run: | | ||
| # apt update -y | ||
| # # Install dependencies of Open-COBOL-ESQL | ||
| # apt install -y build-essential bison flex gettext texinfo automake autoconf curl libtool libpq-dev pkgconf | ||
| # # Install dependencies of GnuCOBOL | ||
| # apt-get install -y libncurses6 libncurses-dev ncurses-doc libgmp10 libgmp-dev m4 libtool help2man pkg-config gettext automake autoconf libxml2 libxml2-dev libxml2-utils libcjson1 libcjson-dev build-essential libdb-dev | ||
|
|
||
| # Install dependencies (Almalinux 9) | ||
| - name: Install dependencies on AlmaLinux 9 | ||
| if: matrix.os == 'almalinux:9' | ||
| run: | | ||
| dnf -y update | ||
| # Install dependencies of Open-COBOL-ESQL | ||
| dnf install -y gcc gcc-c++ make bison flex automake autoconf diffutils gettext libtool postgresql-devel | ||
| # Install dependencies of GnuCOBOL | ||
| dnf install -y epel-release | ||
| dnf config-manager --set-enabled crb | ||
| dnf makecache | ||
| dnf install -y ncurses-devel gmp-devel help2man bison flex texinfo m4 libtool pkg-config gettext automake autoconf libxml2-devel gcc gcc-c++ make libdb-devel diffutils which wget | ||
|
|
||
| # Cache the directory 'gnucobol-osscons-patch-3.2patch2b' | ||
| - name: Cache GnuCOBOL-osscons-patch-3.2patch2b | ||
| id: gnucobol_cache_id | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: gnucobol-osscons-patch-3.2patch2b | ||
| key: gnucobol-osscons-3.2patch2b-key | ||
|
|
||
| # Build and Install VBISAM | ||
| - name: Build and Install VBISAM | ||
| run: | | ||
| curl -L -o vbisam-osscons-patch-2.0patch1.tar.gz https://github.com/opensourcecobol/vbisam-osscons-patch/archive/refs/tags/v2.0patch1.tar.gz | ||
| tar zxf vbisam-osscons-patch-2.0patch1.tar.gz | ||
| cd vbisam-osscons-patch-2.0patch1 | ||
| ./configure --prefix=/usr/ | ||
| make | ||
| make install | ||
|
|
||
| # Build and Install GnuCOBOL if the cache is not found | ||
| - name: Download and Build GnuCOBOL-osscons-patch-3.2patch2b | ||
| if: steps.gnucobol_cache_id.outputs.cache-hit != 'true' | ||
| run: | | ||
| curl -L -o gnucobol-osscons-patch-3.2patch2b.tar.gz https://github.com/opensourcecobol/gnucobol-osscons-patch/archive/refs/tags/3.2patch2b.tar.gz | ||
| tar zxf gnucobol-osscons-patch-3.2patch2b.tar.gz | ||
| cd gnucobol-osscons-patch-3.2patch2b | ||
| ./configure --prefix=/usr/ --with-xml2 --with-cjson --with-vbisam | ||
| make | ||
|
|
||
| # Install GnuCOBOL | ||
| - name: Install GnuCOBOL-osscons-patch-3.2patch2b | ||
| run: | | ||
| cd gnucobol-osscons-patch-3.2patch2b | ||
| make install | ||
|
|
||
| # Checkout Open-COBOL-ESQL | ||
| - name: Checkout Open-COBOL-ESQL | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| path: Open-COBOL-ESQL | ||
|
|
||
| # Build and Install Open-COBOL-ESQL | ||
| - name: Install Open-COBOL-ESQL | ||
| working-directory: Open-COBOL-ESQL | ||
| run: | | ||
| chmod +x ./autogen.sh && ./autogen.sh | ||
| ./configure | ||
| make | ||
| make install | ||
|
|
||
| # Create a log directory | ||
| - name: Create a log directory | ||
| run: | | ||
| mkdir -p Open-COBOL-ESQL/log/test | ||
|
|
||
| # Run Autotest | ||
| - name: Run tests | ||
| working-directory: Open-COBOL-ESQL/tests | ||
| run: | | ||
| make clean | ||
| cp ../.github/workflows/test-settings/atlocal atlocal | ||
| cp ../.github/workflows/test-settings/embed_db_info.sh embed_db_info.sh | ||
| cp ../.github/workflows/test-settings/cobol_runner.sh cobol_runner.sh | ||
| make | ||
| ./basic | ||
| ./cobol_data | ||
| ./sql_data | ||
| ./sqlca | ||
| ./misc | ||
| cp -r basic.dir cobol_data.dir sql_data.dir sqlca.dir ./*.log ../log/test | ||
|
|
||
| # Define the archive name | ||
| - name: Define the archive name | ||
| run: | | ||
| echo "OCESQL_ARCHIVE_NAME=ocesql-${{ matrix.os }}" | sed s/:/-/g >> "$GITHUB_ENV" | ||
|
|
||
| # Upload test logs and the result of static checking | ||
| - name: Archive Logs | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ env.OCESQL_ARCHIVE_NAME }}.log | ||
| path: Open-COBOL-ESQL/log/* | ||
|
|
||
| # Workflow fails if one or more test cases failed | ||
| - name: Check test results | ||
| run: | | ||
| cat Open-COBOL-ESQL/tests/*.log | ||
| ! cat Open-COBOL-ESQL/tests/*.log | grep -q 'Failed tests:' | ||
File renamed without changes.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.