tuxji commented on a change in pull request #532:
URL: https://github.com/apache/daffodil/pull/532#discussion_r617770154



##########
File path: .github/workflows/main.yml
##########
@@ -25,30 +25,64 @@ jobs:
       matrix:
         java_version: [ 8, 11, 16 ]
         scala_version: [ 2.12.11 ]
-        os: [ 'ubuntu-latest', 'windows-latest' ]
-    env:
-      SBT: sbt -J-Xms1024m -J-Xmx5120m -J-XX:ReservedCodeCacheSize=512m 
-J-XX:MaxMetaspaceSize=1024m ++${{ matrix.scala_version }} coverage
-      SBTNOCOV: sbt -J-Xms1024m -J-Xmx5120m -J-XX:ReservedCodeCacheSize=512m 
-J-XX:MaxMetaspaceSize=1024m ++${{ matrix.scala_version }}
+        os: [ ubuntu-20.04, windows-2019 ]
+        include:
+          - os: ubuntu-20.04
+            shell: bash
+          - os: windows-2019
+            shell: msys2 {0}
 
     runs-on: ${{ matrix.os }}
     defaults:
       run:
-        shell: bash
-
+        shell: ${{ matrix.shell }}
+    env:
+      SBT: sbt -J-Xms1024m -J-Xmx5120m -J-XX:ReservedCodeCacheSize=512m 
-J-XX:MaxMetaspaceSize=1024m ++${{ matrix.scala_version }} coverage
+      SBTNOCOV: sbt -J-Xms1024m -J-Xmx5120m -J-XX:ReservedCodeCacheSize=512m 
-J-XX:MaxMetaspaceSize=1024m ++${{ matrix.scala_version }}
     steps:
 
       ############################################################
       # Setup
       ############################################################
 
-      - name: Checkout Repository
-        uses: actions/[email protected]
+      - name: Install Dependencies (Linux)
+        if: runner.os == 'Linux'
+        run: sudo apt-get install -y libmxml-dev
+
+      - name: Install Dependencies (Windows)
+        if: runner.os == 'Windows'
+        uses: msys2/setup-msys2@v2
+        with:
+          install: gcc libargp-devel make pkgconf
+          path-type: inherit
 
-      - name: Install Java
-        uses: actions/setup-java@v1
+      - name: Check out mxml source (Windows)
+        if: runner.os == 'Windows'
+        uses: actions/[email protected]
+        with:
+          repository: michaelrsweet/mxml
+          ref: v3.2
+          path: mxml
+
+      - name: Install mxml library (Windows)
+        if: runner.os == 'Windows'
+        run: |
+          cd mxml
+          ./configure --prefix=/usr --disable-shared --disable-threads
+          make
+          make install
+          # Workaround for sbt hanging problem
+          echo "COURSIER_CACHE=$temp" >> $GITHUB_ENV
+          echo "COURSIER_CONFIG_DIR=$temp" >> $GITHUB_ENV

Review comment:
       No, the dev.dirs hanging problem has nothing to do with mxml 
installation.  I put the >> $GITHUB_END commands there only because I needed a 
step that runs only on Windows and lets me change the environment before the 
sbt compile step.  
   
   I need to file a bug report with a reproducible test case in dev.dirs.  Note 
that dev.dirs exhibits the problem but they may or may not be responsible for 
it.  Their code which tries to run a Windows PowerShell script using a Java 
subprocess call hangs when run from MSYS2 on Windows although it works fine 
when run from CMD on Windows.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to