You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by sl...@apache.org on 2019/08/19 17:25:34 UTC
[incubator-daffodil] 01/01: Add Github Actions configuration
This is an automated email from the ASF dual-hosted git repository.
slawrence pushed a commit to branch daffodil-498-windows-ci
in repository https://gitbox.apache.org/repos/asf/incubator-daffodil.git
commit 259e633c62bd653f67e1f00594be4ef27c3f887d
Author: Steve Lawrence <sl...@apache.org>
AuthorDate: Wed Aug 14 09:26:50 2019 -0400
Add Github Actions configuration
Builds/tests are more consistent with Github Actions and also supports
Windows. Very similar to Azure pipelines, but is enabled by ASF.
DAFFODIL-498
---
.github/workflows/main.yml | 138 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 138 insertions(+)
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
new file mode 100644
index 0000000..2595f8d
--- /dev/null
+++ b/.github/workflows/main.yml
@@ -0,0 +1,138 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+name: Apache Daffodil Continuous Integration
+
+on: [push, pull_request]
+
+jobs:
+ test:
+ name: ${{ matrix.os }}, Java ${{ matrix.java_version }}, Scala ${{ matrix.scala_version }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ java_version: [ '8.x', '9.x', '11.x' ]
+ scala_version: [ '2.12.6', '2.11.12' ]
+ os: [ 'ubuntu-latest' ]
+ env:
+ # that this adds the coverage option at the end so all sbt commands are built with code coverage enabled
+ SBT: sbt -J-Xms1024m -J-Xmx4096m -J-XX:ReservedCodeCacheSize=512m -J-XX:MaxMetaspaceSize=1024m ++${{ matrix.scala_version }} coverage
+
+ steps:
+
+ ############################################################
+ # Debug Context Information
+ ############################################################
+
+ - name: Dump GitHub context
+ env:
+ GITHUB_CONTEXT: ${{ toJson(github) }}
+ run: echo "$GITHUB_CONTEXT"
+
+ - name: Dump strategy context
+ env:
+ STRATEGY_CONTEXT: ${{ toJson(strategy) }}
+ run: echo "$STRATEGY_CONTEXT"
+
+ - name: Dump matrix context
+ env:
+ MATRIX_CONTEXT: ${{ toJson(matrix) }}
+ run: echo "$MATRIX_CONTEXT"
+
+ - name: Dump job context
+ env:
+ JOB_CONTEXT: ${{ toJson(job) }}
+ run: echo "$JOB_CONTEXT"
+
+ - name: Dump runner context
+ env:
+ RUNNER_CONTEXT: ${{ toJson(runner) }}
+ run: echo "$RUNNER_CONTEXT"
+
+ - name: Dump steps context
+ env:
+ STEPS_CONTEXT: ${{ toJson(steps) }}
+ run: echo "$STEPS_CONTEXT"
+
+
+ ############################################################
+ # Setup
+ ############################################################
+
+ - name: Checkout Repository
+ uses: actions/checkout@master
+
+ - name: Install Linux Dependencies
+ run: |
+ echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
+ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
+ sudo apt-get -y update
+ sudo apt-get -y install rpm sbt
+ if: matrix.os == 'ubuntu-latest'
+
+ #- name: Install Windows Dependencies
+ # if: matrix.os == 'windows-latest'
+ # run: |
+ # choco install sbt
+ # echo "##vso[task.prependpath]/c/Program Files (x86)/sbt/bin/"
+
+ - name: Install Java ${{ matrix.java_version }}
+ uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java_version }}
+
+ ############################################################
+ # Build & Package
+ ############################################################
+
+ - name: Compile
+ run: $SBT compile test:compile it:compile
+ id: compile
+
+ - name: Build Documentation
+ run: $SBT daffodil-japi/genjavadoc:doc daffodil-sapi/doc
+ continue-on-error: true
+
+ - name: Package Zip & Tar
+ run: $SBT daffodil-cli/universal:packageBin daffodil-cli/universal:packageZipTarball
+ continue-on-error: true
+
+ - name: Package RPM
+ run: $SBT daffodil-cli/rpm:packageBin
+ if: matrix.os == 'ubuntu-latest'
+ continue-on-error: true
+
+ ############################################################
+ # Test
+ ############################################################
+
+ - name: Run Rat Check
+ run: $SBT ratCheck || (cat target/rat.txt; exit 1)
+ continue-on-error: true
+
+ - name: Run Unit Tests
+ run: $SBT test
+ continue-on-error: true
+
+ - name: Run Integration Tests
+ run: $SBT it:test
+ continue-on-error: true
+
+ # Disabled for until we switch from TravisCI to Github Actions
+ #- name: Generate Coverage Report
+ # run: |
+ # $SBT coverageReport
+ # bash <(curl -s https://codecov.io/bash)
+ # continue-on-error: true