Add git worktree support #818
Workflow file for this run
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - 'README.md' | |
| - 'CHANGELOG.md' | |
| - 'resources/ECA_VERSION' | |
| - 'docs/**' | |
| - 'images/**' | |
| - 'mkdocs.yml' | |
| - 'deps-lock.json' | |
| - '.github/workflows/nightly.yml' | |
| - '.github/workflows/docs.yml' | |
| - '.github/workflows/release.yml' | |
| pull_request: | |
| jobs: | |
| unit-test: | |
| runs-on: ${{matrix.os}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04] | |
| jdk: [24] | |
| include: | |
| - os: windows-latest | |
| jdk: 24 | |
| - os: macos-latest | |
| jdk: 24 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK ${{ matrix.jdk }} | |
| uses: actions/setup-java@v1 | |
| with: | |
| java-version: ${{ matrix.jdk }} | |
| - name: Install Clojure | |
| uses: DeLaGuardo/setup-clojure@master | |
| with: | |
| cli: '1.12.0.1530' | |
| bb: '1.12.200' | |
| - name: Run tests | |
| run: bb test | |
| jvm-integration-test: | |
| runs-on: ${{matrix.os}} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04] | |
| jdk: [24] | |
| include: | |
| - os: windows-latest | |
| jdk: 24 | |
| - os: macos-latest | |
| jdk: 24 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK ${{ matrix.jdk }} | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'adopt' | |
| java-version: ${{ matrix.jdk }} | |
| - name: Install clojure build tools | |
| uses: DeLaGuardo/setup-clojure@master | |
| with: | |
| cli: '1.12.0.1530' | |
| bb: '1.12.200' | |
| - name: Generate embedded binary | |
| run: | | |
| # On Windows, babashka.deps/clojure sometimes fails with | |
| # AccessDeniedException exception when renaming temp files | |
| # while downloading dependencies. Workaround: offload some | |
| # of the deps download to the clojure CLI tool. | |
| clojure -P | |
| bb prod-cli | |
| - name: Run integration tests | |
| run: bb integration-test | |
| graalvm-build: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Clojure | |
| uses: DeLaGuardo/setup-clojure@master | |
| with: | |
| cli: '1.12.0.1530' | |
| bb: '1.12.200' | |
| - uses: graalvm/setup-graalvm@v1 | |
| with: | |
| java-version: '24' | |
| distribution: 'graalvm' | |
| native-image-musl: true | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build static Linux native image | |
| env: | |
| ECA_XMX: "-J-Xmx6g" | |
| ECA_STATIC: true | |
| ECA_MUSL: true | |
| run: | | |
| bb native-cli | |
| - name: Compress binary | |
| uses: svenstaro/upx-action@v2 | |
| with: | |
| file: eca | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: eca-native | |
| path: eca | |
| graalvm-integration-test: | |
| needs: graalvm-build | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 24 | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'adopt' | |
| java-version: 24 | |
| - name: Install clojure build tools | |
| uses: DeLaGuardo/setup-clojure@master | |
| with: | |
| cli: '1.12.0.1530' | |
| bb: '1.12.200' | |
| - uses: actions/download-artifact@v4 | |
| name: eca-native | |
| - name: Setup binary | |
| run: | | |
| cp -rf eca-native/eca eca | |
| chmod +x eca | |
| - name: Run integration tests | |
| run: bb integration-test | |
| nix-build: | |
| needs: unit-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: cachix/install-nix-action@v31 | |
| - run: nix develop --command deps-lock-update | |
| - run: | | |
| echo "checking if deps-lock.json is up to date" | |
| git diff --exit-code | |
| - run: nix build |