diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 55ce02110..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,27 +0,0 @@ -version: 2 -machine: true -jobs: - build: - machine: - image: ubuntu-2204:current - working_directory: ~/circleci-java - steps: - - run: - name: Install OpenJDK 17 - command: | - sudo apt-get update && sudo apt-get install -y openjdk-17-jdk - sudo update-alternatives --set java /usr/lib/jvm/java-17-openjdk-amd64/bin/java - sudo update-alternatives --set javac /usr/lib/jvm/java-17-openjdk-amd64/bin/javac - java -version - - checkout - - restore_cache: - key: maven-dependencies-{{ checksum "pom.xml" }} - - run: cd prometheus-metrics-shaded-dependencies && ../mvnw clean install && cd .. - - run: ./mvnw clean install - - run: ./mvnw javadoc:jar - - save_cache: - paths: - - ~/.m2 - key: maven-dependencies-{{ checksum "pom.xml" }} -orbs: - prometheus: prometheus/prometheus@0.16.0 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..835d4dcde --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,23 @@ +name: Build + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up JDK + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: temurin + cache: 'maven' + - name: Shaded dependencies + run: | + cd prometheus-metrics-shaded-dependencies + ../mvnw clean install + - name: Run the Maven verify phase + run: | + ./mvnw clean install + ./mvnw javadoc:jar