Add GitHub Actions build and remove Travis-CI

This commit is contained in:
Gary Gregory 2022-09-26 09:30:04 -04:00 committed by Oleg Kalnichevski
parent 9c0575494a
commit 3295f28f47
4 changed files with 63 additions and 44 deletions

60
.github/workflows/maven.yml vendored Normal file
View File

@ -0,0 +1,60 @@
# 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: Java CI
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
# All LTS versions plus the current version
java: [ 8, 11, 17 ]
experimental: [false]
# include:
# - java: 20-ea
# os: ubuntu-latest
# experimental: true
# - java: 20-ea
# os: windows-latest
# experimental: true
# - java: 20-ea
# os: macos-latest
# experimental: true
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn -V --file pom.xml --no-transfer-progress -DtrimStackTrace=false -P-use-toolchains

View File

@ -1,42 +0,0 @@
# 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.
language: java
dist: trusty
sudo: false
arch:
- amd64
- arm64
addons:
apt:
packages:
- maven
# Use some Oracle JDKs to avoid certificate issues.
# openjdk11 might be too old on some Travis agents.
jdk:
- openjdk12
- oraclejdk17
matrix:
fast_finish: true
allow_failures:
- jdk: openjdk-ea
cache:
directories:
- $HOME/.m2

View File

@ -25,7 +25,7 @@ Apache HttpComponents Client
Welcome to the HttpClient component of the Apache HttpComponents project.
[![Build Status](https://travis-ci.com/apache/httpcomponents-client.svg?branch=master)](https://travis-ci.com/apache/httpcomponents-client)
[![GitHub Actions Status](https://github.com/apache/httpcomponents-client/workflows/Java%20CI/badge.svg)](https://github.com/apache/httpcomponents-client/actions)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.httpcomponents.client5/httpclient5/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.httpcomponents.client5/httpclient5)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
@ -37,7 +37,7 @@ For building from source instructions please refer to [BUILDING.txt](./BUILDING.
Dependencies
------------
HttpClient main module requires Java 7 compatible runtime and
HttpClient main module requires Java 8 compatible runtime and
depends on the following external libraries:
* [Apache HttpComponents HttpCore](https://github.com/apache/httpcomponents-core)

View File

@ -210,6 +210,7 @@
</modules>
<build>
<defaultGoal>clean verify</defaultGoal>
<plugins>
<plugin>
<artifactId>maven-jar-plugin</artifactId>