diff --git a/.circleci/config.yml b/.circleci/config.yml index c781fdc..77889be 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,8 +1,4 @@ -version: 2.1 - -orbs: - sdkman: joshdholtz/sdkman@0.2.0 - +version: 2 defaults: &defaults working_directory: ~/repo environment: @@ -10,31 +6,18 @@ defaults: &defaults TERM: dumb CI_NAME: "CircleCI" -commands: - build_and_test: - parameters: - reports-dir: - type: string - default: "build/reports/test_results" - steps: - - checkout - - sdkman/setup-sdkman - - sdkman/sdkman-install: - candidate: kotlin - version: 2.1.10 - - run: - name: Download dependencies - command: ./bld download - - run: - name: Compile source - command: ./bld compile - - run: - name: Run tests - command: ./bld jacoco -reports-dir=<< parameters.reports-dir >> - - store_test_results: - path: << parameters.reports-dir >> - - store_artifacts: - path: build/reports/jacoco/test/html +defaults_gradle: &defaults_bld + steps: + - checkout + - run: + name: Download the bld dependencies + command: ./bld download + - run: + name: Compile source with bld + command: ./bld compile + - run: + name: Run tests with bld + command: ./bld test jobs: bld_jdk17: @@ -43,20 +26,19 @@ jobs: docker: - image: cimg/openjdk:17.0 - steps: - - build_and_test + <<: *defaults_bld - bld_jdk21: + bld_jdk20: <<: *defaults docker: - - image: cimg/openjdk:21.0 + - image: cimg/openjdk:20.0 - steps: - - build_and_test + <<: *defaults_bld workflows: + version: 2 bld: jobs: - bld_jdk17 - - bld_jdk21 + - bld_jdk20 diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index 2f03292..ba51eb1 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -2,67 +2,48 @@ name: bld-ci on: [ push, pull_request, workflow_dispatch ] -env: - COVERAGE_JDK: "21" - COVERAGE_KOTLIN: "2.1.20" - jobs: build-bld-project: + runs-on: ubuntu-latest + + env: + COVERAGE_SDK: "17" + strategy: matrix: - java-version: [ 17, 21, 24 ] - kotlin-version: [ 1.9.25, 2.0.21, 2.1.20 ] - os: [ ubuntu-latest, windows-latest, macos-latest ] - - runs-on: ${{ matrix.os }} + java-version: [ 17, 20 ] steps: - name: Checkout source repository - uses: actions/checkout@v4 + uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Set up JDK ${{ matrix.java-version }} with Kotlin ${{ matrix.kotlin-version }} - uses: actions/setup-java@v4 + - name: Set up JDK ${{ matrix.java-version }} + uses: actions/setup-java@v3 with: - distribution: "zulu" + distribution: 'zulu' java-version: ${{ matrix.java-version }} - - name: Download dependencies [bld example] - working-directory: examples/bld + - name: Grant bld execute permission + run: chmod +x bld + + - name: Download the bld dependencies run: ./bld download - - name: Compile and run examples [bld example] - working-directory: examples/bld - run: | - ./bld compile - ./bld run - ./bld run-java - - - name: Run examples [gradle example] - working-directory: examples/gradle - run: | - ./gradlew run - ./gradlew runJava - - - name: Download dependencies - run: ./bld download - - - name: Compile source + - name: Compile source with bld run: ./bld compile - - name: Run tests + - name: Run tests with bld run: ./bld jacoco - name: Remove pom.xml - if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN - && matrix.os == 'ubuntu-latest' + if: success() && matrix.java-version == env.COVERAGE_SDK run: rm -rf pom.xml - name: SonarCloud Scan uses: sonarsource/sonarcloud-github-action@master - if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN - && matrix.os == 'ubuntu-latest' + if: success() && matrix.java-version == env.COVERAGE_SDK env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/.gitignore b/.gitignore index ea86fe8..9c35a25 100644 --- a/.gitignore +++ b/.gitignore @@ -54,4 +54,4 @@ atlassian-ide-plugin.xml # Editor-based Rest Client .idea/httpRequests -local.properties +local.properties \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 10b9b0f..052df48 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,24 +1,11 @@ -image: fedora:latest - -variables: - CI_NAME: "GitLab CI" +image: openjdk:17 stages: - test -before_script: - - dnf -qy update && dnf -y install zip - - curl -s "https://get.sdkman.io" | bash - - echo sdkman_auto_answer=true > $HOME/.sdkman/etc/config - - echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config - - source "$HOME/.sdkman/bin/sdkman-init.sh" - - sdk install java - - sdk install kotlin - - source "$HOME/.sdkman/bin/sdkman-init.sh" - test: stage: test script: - - ./bld download - - ./bld compile - - ./bld test + - ./bld download + - ./bld compile + - ./bld test diff --git a/.idea/app.iml b/.idea/app.iml index 9e43636..2c1fe21 100644 --- a/.idea/app.iml +++ b/.idea/app.iml @@ -11,8 +11,6 @@ - - diff --git a/.idea/bld.xml b/.idea/bld.xml deleted file mode 100644 index 6600cee..0000000 --- a/.idea/bld.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 6b3d5a0..562d6ca 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -32,49 +32,12 @@