Skip to content

Commit

Permalink
Add github action workflow
Browse files Browse the repository at this point in the history
Add a github action workflow similar to the previous travis workflow.
It is triggered on pull requests and push to the main branch.
  • Loading branch information
laurentgo committed Oct 17, 2023
1 parent a7ab32a commit 5feb0fa
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 37 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Main

on:
pull_request:
types:
- opened
- synchronized
- reopened
push:
branches:
- main

jobs:
linux:
name: Linux
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
architecture: x64
cache: maven

- name: Download all dependencies
run: |
# Download all dependencies that integration tests might need later
./mvnw -B -V -Dstyle.color=always dependency:go-offline -f src/it/dependencies/pom.xml -P protoc-3.4.0
./mvnw -B -V -Dstyle.color=always dependency:go-offline -f src/it/dependencies/pom.xml -P protoc-3.11.1
./mvnw -B -V -Dstyle.color=always dependency:go-offline -P run-its
# These protoc executables were downloaded in the previous phase and are being referenced in toolchains.xml
chmod +x $HOME/.m2/repository/com/google/protobuf/protoc/3.4.0/protoc-3.4.0-linux-x86_64.exe
chmod +x $HOME/.m2/repository/com/google/protobuf/protoc/3.11.1/protoc-3.11.1-linux-x86_64.exe
- name: Build and test
run: |
./mvnw -B -V -t .github/workflows/toolschains-linux.xml -Dstyle.color=always clean verify -P run-its -Dinvoker.streamLogs=true
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<id>openjdk8</id>
</provides>
<configuration>
<jdkHome>/usr/lib/jvm/java-8-openjdk-amd64</jdkHome>
<jdkHome>${env.JAVA_HOME}</jdkHome>
</configuration>
</toolchain>
<toolchain>
Expand All @@ -34,9 +34,7 @@
<version>3.4.0</version>
</provides>
<configuration>
<protocExecutable>
/home/travis/.m2/repository/com/google/protobuf/protoc/3.4.0/protoc-3.4.0-linux-x86_64.exe
</protocExecutable>
<protocExecutable>${env.HOME}/.m2/repository/com/google/protobuf/protoc/3.4.0/protoc-3.4.0-linux-x86_64.exe</protocExecutable>
</configuration>
</toolchain>
<toolchain>
Expand All @@ -45,9 +43,7 @@
<version>3.11.1</version>
</provides>
<configuration>
<protocExecutable>
/home/travis/.m2/repository/com/google/protobuf/protoc/3.11.1/protoc-3.11.1-linux-x86_64.exe
</protocExecutable>
<protocExecutable>${env.HOME}/.m2/repository/com/google/protobuf/protoc/3.11.1/protoc-3.11.1-linux-x86_64.exe</protocExecutable>
</configuration>
</toolchain>
</toolchains>
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

0 comments on commit 5feb0fa

Please sign in to comment.