From 889c0eaa376002d2b55153ffce8d5d7d788a83b5 Mon Sep 17 00:00:00 2001 From: Janne Valkealahti Date: Fri, 30 Aug 2024 16:40:40 +0100 Subject: [PATCH] stash --- .github/actions/setup-zig/action.yml | 9 ++ .github/workflows/ci.yml | 196 ++++++++++++++------------- 2 files changed, 111 insertions(+), 94 deletions(-) create mode 100644 .github/actions/setup-zig/action.yml diff --git a/.github/actions/setup-zig/action.yml b/.github/actions/setup-zig/action.yml new file mode 100644 index 000000000..b370b634f --- /dev/null +++ b/.github/actions/setup-zig/action.yml @@ -0,0 +1,9 @@ +name: Setup Zig +description: Installs a zig compiler +runs: + using: composite + steps: + - uses: goto-bus-stop/setup-zig@v2 + with: + version: 0.13.0 + diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8dcbff58a..5bb9ef1ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,100 +8,108 @@ on: jobs: build: - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - include: - - nickname: linux jdk17 - java: 17 - os: ubuntu-latest - - nickname: macos intel jdk17 - java: 17 - os: macos-12 - - nickname: macos arm jdk17 - java: 17 - os: macos-latest - - nickname: windows jdk17 - java: 17 - os: windows-latest - name: CI Build ${{ matrix.nickname }} - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: adopt - java-version: | - 22 - 17 - cache: gradle - - name: Build - run: ./gradlew build - - name: Upload Build Logs - if: ${{ failure() }} - uses: actions/upload-artifact@v3 - with: - name: buildlogs-${{ matrix.nickname }} - path: | - */build/reports - */*/build/reports - local: - runs-on: ubuntu-latest - needs: [build] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: adopt - java-version: | - 22 - 17 - cache: gradle - - name: Build - run: ./gradlew publishMavenJavaPublicationToLocalRepository - - name: Upload Local Repo - uses: actions/upload-artifact@v3 - with: - name: localrepo - path: | - build/publications/repos - publish: runs-on: ubuntu-latest - if: github.repository_owner == 'spring-projects' - needs: [build] steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: adopt - java-version: | - 22 - 17 - cache: gradle - - uses: jfrog/setup-jfrog-cli@v3 - with: - version: 2.21.5 - env: - JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} - - name: Configure JFrog Cli + - uses: ./.github/actions/setup-zig + - name: Zig Version run: | - jf rt gradlec \ - --use-wrapper \ - --uses-plugin \ - --deploy-ivy-desc=false \ - --server-id-resolve repo.spring.io \ - --server-id-deploy repo.spring.io \ - --repo-resolve snapshot \ - --repo-deploy snapshot - echo JFROG_CLI_BUILD_NAME=spring-shell-main >> $GITHUB_ENV - echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV - - name: Build and Publish - env: - ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} - ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }} - GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }} - GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} - GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} - run: | - jf rt gradle build artifactoryPublish - jf rt build-publish + zig version + + # build: + # runs-on: ${{ matrix.os }} + # strategy: + # fail-fast: false + # matrix: + # include: + # - nickname: linux jdk17 + # java: 17 + # os: ubuntu-latest + # - nickname: macos intel jdk17 + # java: 17 + # os: macos-12 + # - nickname: macos arm jdk17 + # java: 17 + # os: macos-latest + # - nickname: windows jdk17 + # java: 17 + # os: windows-latest + # name: CI Build ${{ matrix.nickname }} + # steps: + # - uses: actions/checkout@v3 + # - uses: actions/setup-java@v3 + # with: + # distribution: adopt + # java-version: | + # 22 + # 17 + # cache: gradle + # - name: Build + # run: ./gradlew build + # - name: Upload Build Logs + # if: ${{ failure() }} + # uses: actions/upload-artifact@v3 + # with: + # name: buildlogs-${{ matrix.nickname }} + # path: | + # */build/reports + # */*/build/reports + # local: + # runs-on: ubuntu-latest + # needs: [build] + # steps: + # - uses: actions/checkout@v3 + # - uses: actions/setup-java@v3 + # with: + # distribution: adopt + # java-version: | + # 22 + # 17 + # cache: gradle + # - name: Build + # run: ./gradlew publishMavenJavaPublicationToLocalRepository + # - name: Upload Local Repo + # uses: actions/upload-artifact@v3 + # with: + # name: localrepo + # path: | + # build/publications/repos + # publish: + # runs-on: ubuntu-latest + # if: github.repository_owner == 'spring-projects' + # needs: [build] + # steps: + # - uses: actions/checkout@v3 + # - uses: actions/setup-java@v3 + # with: + # distribution: adopt + # java-version: | + # 22 + # 17 + # cache: gradle + # - uses: jfrog/setup-jfrog-cli@v3 + # with: + # version: 2.21.5 + # env: + # JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} + # - name: Configure JFrog Cli + # run: | + # jf rt gradlec \ + # --use-wrapper \ + # --uses-plugin \ + # --deploy-ivy-desc=false \ + # --server-id-resolve repo.spring.io \ + # --server-id-deploy repo.spring.io \ + # --repo-resolve snapshot \ + # --repo-deploy snapshot + # echo JFROG_CLI_BUILD_NAME=spring-shell-main >> $GITHUB_ENV + # echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV + # - name: Build and Publish + # env: + # ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY }} + # ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_PASSPHRASE }} + # GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }} + # GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }} + # GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }} + # run: | + # jf rt gradle build artifactoryPublish + # jf rt build-publish