Skip to content

Commit

Permalink
use ci dist for MSYS1
Browse files Browse the repository at this point in the history
  • Loading branch information
GitMensch committed Sep 29, 2024
1 parent 181180f commit 1c843b8
Showing 1 changed file with 37 additions and 19 deletions.
56 changes: 37 additions & 19 deletions .github/workflows/windows-msys1.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Windows MSYS1 Workflow

on:
#pull_request:
# branches: [ gcos4gnucobol-3.x ]
push:
# manual run in actions tab - for all branches
workflow_dispatch:
inputs:
run_id:
description: 'The run ID of the workflow providing the CI tarball'
required: true

env:
MSYS_ROOT: C:\MinGW
Expand Down Expand Up @@ -42,13 +42,31 @@ jobs:

steps:

- name: Set git user
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
#- name: Set git user
# run: |
# git config --global user.name github-actions
# git config --global user.email [email protected]

#- name: Checkout code
# uses: actions/checkout@v4

- name: Get CI dist tarball
uses: actions/download-artifact@v4
with:
name: gnucobol-ci source distribution
run-id: ${{ github.event.inputs.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}

#- name: Display structure of downloaded files
# run: ls -R

- name: Checkout code
uses: actions/checkout@v4
- name: Build environment setup
run: |
bash -lc "tar -xvf gnucobol*.tar.* --strip-components=1"
mkdir build
rem sed -i 'N;s/else/else :;/g' .\configure
rem sed -i 's/\} else \:;/} else/g' .\configure
rem sed -i 's/#else \:;/#else/g' .\configure
- name: Setup environment
shell: pwsh
Expand Down Expand Up @@ -255,18 +273,18 @@ jobs:
curl -L https://raw.githubusercontent.com/DaveGamble/cJSON/v%MINGW_CJSON_VERS%/cJSON.h -o .\libcob\cJSON.h
- name: Bootstrap GnuCOBOL
run: |
sed -i 's/AM_PROG_AR/m4_ifdef\(\[AM_PROG_AR\], \[AM_PROG_AR\]\)/g' .\configure.ac
sed -i 's/po extras doc tests/po extras tests/g' .\Makefile.am
bash -lc "./autogen.sh"
# - name: Bootstrap GnuCOBOL
# run: |
# sed -i 's/AM_PROG_AR/m4_ifdef\(\[AM_PROG_AR\], \[AM_PROG_AR\]\)/g' .\configure.ac
# sed -i 's/po extras doc tests/po extras tests/g' .\Makefile.am
# bash -lc "./autogen.sh"

- name: Configure GnuCOBOL
run: |
mkdir build
sed -i 'N;s/else/else :;/g' .\configure
sed -i 's/\} else \:;/} else/g' .\configure
sed -i 's/#else \:;/#else/g' .\configure
rem mkdir build
rem sed -i 'N;s/else/else :;/g' .\configure
rem sed -i 's/\} else \:;/} else/g' .\configure
rem sed -i 's/#else \:;/#else/g' .\configure
rem extra setting CPPFLAGS as " are wrong here
bash -lc "cd build && ../configure CPPFLAGS=\"-I../libcob\" %CFGOPT% --with-db --with-xml2 --with-json=local --with-curses=pdcurses --prefix=/mingw"
Expand Down

0 comments on commit 1c843b8

Please sign in to comment.