Skip to content

Commit

Permalink
Migrate Travis CI to GitHub Actions
Browse files Browse the repository at this point in the history
Signed-off-by: tison <wander4096@gmail.com>
  • Loading branch information
tisonkun committed Dec 5, 2023
1 parent 43ed4d4 commit fb19796
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 20 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI
on:
pull_request:
branches: [ master ]
push:
branches: [ master ]

# Concurrency strategy:
# github.workflow: distinguish this workflow from others
# github.event_name: distinguish `push` event from `pull_request` event
# github.event.number: set to the number of the pull request if `pull_request` event
# github.run_id: otherwise, it's a `push` or `schedule` event, only cancel if we rerun the workflow
#
# Reference:
# https://docs.github.com/en/actions/using-jobs/using-concurrency
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.number || github.run_id }}
cancel-in-progress: true

jobs:
test:
strategy:
matrix:
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest']
java: [ '8', '11', '17', '21' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v4
with:
cache: 'maven'
distribution: 'zulu'
java-version: ${{ matrix.java }}
- name: Build and test
run: ./test
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion test
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash -e
#!/usr/bin/env bash -e

cd "$(dirname "$0")"
TOP_PROJ_DIR="$PWD"
BUILD_SRC_DIR="$PWD/src/build"
Expand Down

0 comments on commit fb19796

Please sign in to comment.