Move bb dep from task to deps for earlier ci dling #214
Workflow file for this run
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: Test | |
on: [push, pull_request] | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
outputs: | |
tests: ${{ steps.set-tests.outputs.tests }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Clojure deps cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.m2/repository | |
~/.deps.clj | |
~/.gitlibs | |
key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }} | |
restore-keys: cljdeps- | |
- name: "Setup Java" | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: Install Clojure Tools | |
uses: DeLaGuardo/setup-clojure@10.3 | |
with: | |
bb: 'latest' | |
# This assumes downloaded deps are same for all OSes | |
- name: Bring down deps | |
run: bb download-deps | |
- id: set-tests | |
name: Set test var for matrix | |
# run test.clj directly instead of via bb task to avoid generic task output | |
run: echo "tests=$(bb script/test_matrix.clj --format json)" >> $GITHUB_OUTPUT | |
build: | |
needs: setup | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: ${{fromJSON(needs.setup.outputs.tests)}} | |
name: ${{ matrix.desc }} | |
steps: | |
- name: Tune Windows network | |
if: ${{ matrix.os == 'windows' }} | |
run: Disable-NetAdapterChecksumOffload -Name * -TcpIPv4 -UdpIPv4 -TcpIPv6 -UdpIPv6 | |
- name: Tune macOS network | |
if: ${{ matrix.os == 'macos' }} | |
run: | | |
sudo sysctl -w net.link.generic.system.hwcksum_tx=0 | |
sudo sysctl -w net.link.generic.system.hwcksum_rx=0 | |
- name: Install Ubuntu X11 Utils | |
if: ${{ matrix.os == 'ubuntu' }} | |
run: sudo apt-get -y install x11-utils | |
- name: Install Linux Windows Manager | |
if: ${{ matrix.os == 'ubuntu' }} | |
run: sudo apt-get -y install fluxbox | |
- uses: actions/checkout@v3 | |
- name: Clojure deps cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.m2/repository | |
~/.deps.clj | |
~/.gitlibs | |
key: cljdeps-${{ hashFiles('deps.edn', 'bb.edn') }} | |
restore-keys: cljdeps- | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: Install Clojure Tools | |
uses: DeLaGuardo/setup-clojure@10.3 | |
with: | |
bb: 'latest' | |
- name: Tools versions | |
run: bb tools-versions | |
- name: Run Tests | |
run: ${{ matrix.cmd }} |