Skip to content

Commit

Permalink
feature: update dist upload and download test
Browse files Browse the repository at this point in the history
  • Loading branch information
wangqi committed Jan 30, 2025
1 parent 569824b commit d7436e6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/ci-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ name: CI-Maven
on:
workflow_dispatch:
workflow_call:
inputs:
os:
required: true
type: string
jdk:
required: true
type: string
outputs:
dist_name:
description: "carp-dist output name"
Expand All @@ -31,18 +38,18 @@ jobs:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
jdk: [ 17 ]
runs-on: ${{ matrix.os }}
runs-on: ${{ inputs.os }}
outputs:
dist_name: ${{ steps.output-dist-name.outputs.dist_name }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Java JDK ${{ matrix.jdk }}
- name: Setup Java JDK ${{ inputs.jdk }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.jdk }}
java-version: ${{ inputs.jdk }}
distribution: temurin
cache: maven
- name: Build with Maven
Expand All @@ -51,12 +58,12 @@ jobs:
- name: Upload dist
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}-${{ matrix.jdk }}
name: dist-${{ inputs.os }}-${{ inputs.jdk }}
path: |
carp-dist/target/carp-*.tar.gz
- name: Output dist name
id: output-dist-name
run: echo "dist_name=dist-${{ matrix.os }}-${{ matrix.jdk }}" >> $GITHUB_OUTPUT
run: echo "dist_name=dist-${{ inputs.os }}-${{ inputs.jdk }}" >> $GITHUB_OUTPUT
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ on:
jobs:

build_maven:
if: github.repository == 'flowerfine/carp'
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
jdk: [ 17 ]
uses: ./.github/workflows/ci-maven.yml
with:
os: ${{ matrix.os }}
jdk: ${{ matrix.jdk }}

output_test:
runs-on: ubuntu-latest
Expand Down

0 comments on commit d7436e6

Please sign in to comment.