🐞 fix: Remove 7z from console workflow for linux and windows #92
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Console Build | |
concurrency: | |
group: console_build_${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
paths-ignore: | |
- .github/** | |
- "!.github/workflows/console_build.yml" | |
- "**.md" | |
- "docs/**" | |
- "android/**" | |
push: | |
paths-ignore: | |
- .github/** | |
- "!.github/workflows/console_build.yml" | |
- "**.md" | |
- "docs/**" | |
- "android/**" | |
env: | |
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
jobs: | |
build_jar: | |
strategy: | |
matrix: | |
include: | |
- name: Linux x86_64 | |
image: ubuntu-latest | |
jar_name: linux-x86-64 | |
zip_exclude_files: "*.dll *arm64*.so *.dylib" | |
- name: MacOS x86_64 | |
image: macos-13 | |
jar_name: macos-x86-64 | |
zip_exclude_files: "*.dll *.so *arm64*.dylib" | |
- name: MacOS arm64 | |
image: macos-14 | |
jar_name: macos-arm64 | |
zip_exclude_files: "*.dll *.so *x86_64*.dylib" | |
- name: Windows x86_64 | |
image: windows-latest | |
jar_name: windows-x86-64 | |
zip_exclude_files: "*arm64*.dll *.dylib *.so" | |
name: Build Jar for ${{ matrix.name }} | |
runs-on: ${{ matrix.image }} | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
- name: Setup JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: corretto | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
gradle-version: 8.5 | |
- name: Build the Artifact | |
run: | | |
cd console | |
gradle build --debug | |
- name: Remove Binary Files for MacOS | |
if: matrix.name == 'MacOS x86_64' || matrix.name == 'MacOS arm64' | |
run: | | |
7z d console/build/libs/*.jar ${{ matrix.zip_exclude_files }} | |
- name: Upload the Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: javet-shell-console-${{ matrix.jar_name }} | |
path: console/build/libs/*.jar | |
build_docker_image: | |
name: Build Docker Image for Linux x86_64 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Docker Build and Push | |
run: | | |
docker build -t ${{ env.DOCKERHUB_USERNAME }}/javet-shell:amd64-latest -f docker/console.Dockerfile . | |
docker push ${{ env.DOCKERHUB_USERNAME }}/javet-shell:amd64-latest |