diff --git a/.github/buildomat/jobs/build-and-test.sh b/.github/buildomat/jobs/build-and-test.sh index 99983f7a979..727914a3e2b 100644 --- a/.github/buildomat/jobs/build-and-test.sh +++ b/.github/buildomat/jobs/build-and-test.sh @@ -2,7 +2,7 @@ #: #: name = "helios / build-and-test" #: variety = "basic" -#: target = "helios" +#: target = "helios-latest" #: rust_toolchain = "nightly-2022-04-27" #: output_rules = [] #: @@ -14,12 +14,6 @@ set -o xtrace cargo --version rustc --version -banner clickhouse -ptime -m ./tools/ci_download_clickhouse - -banner cockroach -ptime -m bash ./tools/ci_download_cockroachdb - # # Set up a custom temporary directory within whatever one we were given so that # we can check later whether we left detritus around. @@ -34,6 +28,9 @@ mkdir $TEST_TMPDIR # export PATH="$PATH:$PWD/out/cockroachdb/bin:$PWD/out/clickhouse" +banner prerequisites +ptime -m bash ./tools/install_prerequisites.sh -y + # # We build with: # diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 17fafc128ac..d8af3b92e4d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -102,26 +102,10 @@ jobs: echo "Disk space:" df -h - - name: Configure GitHub cache for CockroachDB binaries - id: cache-cockroachdb - # actions/cache@v2.1.4 - uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 - with: - key: ${{ runner.os }}-cockroach-binary-${{ hashFiles('tools/cockroachdb_checksums') }} - path: "./out/cockroachdb" - - name: Configure GitHub cache for ClickHouse binaries - id: cache-clickhouse - # actions/cache@v2.1.4 - uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 - with: - key: ${{ runner.os }}-clickhouse-binary-${{ hashFiles('tools/clickhouse_checksums') }} - path: "./out/clickhouse" - - name: Download ClickHouse - if: steps.cache-clickhouse.outputs.cache-hit != 'true' - run: ./tools/ci_download_clickhouse - - name: Download CockroachDB binary - if: steps.cache-cockroachdb.outputs.cache-hit != 'true' - run: bash ./tools/ci_download_cockroachdb + - name: Update PATH + run: echo "$PWD/out/cockroachdb/bin:$PWD/out/clickhouse" >> "$GITHUB_PATH" + - name: Install Pre-Requisites + run: ./tools/install_prerequisites.sh -y - name: Create temporary directory for test outputs run: mkdir -p $OMICRON_TMP - name: Build @@ -138,13 +122,11 @@ jobs: # - TMPDIR=$OMICRON_TMP: we specify a specific temporary directory so that # failed test outputs will be in a known place that we can grab at the # end without also grabbing random other temporary files. - run: TMPDIR=$OMICRON_TMP PATH="$PATH:$PWD/out/cockroachdb/bin:$PWD/out/clickhouse" RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings" cargo build --locked --all-targets --verbose + run: TMPDIR=$OMICRON_TMP RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings" cargo build --locked --all-targets --verbose - name: Run tests # Use the same RUSTFLAGS and RUSTDOCFLAGS as above to avoid having to # rebuild here. - # Put "./cockroachdb/bin" and "./clickhouse" on the PATH for the test - # suite. - run: TMPDIR=$OMICRON_TMP PATH="$PATH:$PWD/out/cockroachdb/bin:$PWD/out/clickhouse" RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings" cargo test --no-fail-fast --workspace --locked --verbose + run: TMPDIR=$OMICRON_TMP RUSTFLAGS="-D warnings" RUSTDOCFLAGS="-D warnings" cargo test --no-fail-fast --workspace --locked --verbose - name: Archive results left by tests # actions/upload-artifact@v2.3.1 uses: actions/upload-artifact@82c141cc518b40d92cc801eee768e7aafc9c2fa2 diff --git a/tools/ci_download_console b/tools/ci_download_console index 307fcadf4eb..e81586c5831 100755 --- a/tools/ci_download_console +++ b/tools/ci_download_console @@ -79,7 +79,16 @@ function do_download_curl function do_sha256sum { - sha256sum < "$1" | awk '{print $1}' + case "$OSTYPE" in + darwin*) + SHA="shasum -a 256" + ;; + *) + SHA="sha256sum" + ;; + esac + + $SHA < "$1" | awk '{print $1}' } function do_untar diff --git a/tools/install_prerequisites.sh b/tools/install_prerequisites.sh index c348c6d971a..056e4f7af0b 100755 --- a/tools/install_prerequisites.sh +++ b/tools/install_prerequisites.sh @@ -123,7 +123,6 @@ fi ./tools/ci_download_cockroachdb ./tools/ci_download_clickhouse - # Install static console assets. These are used when packaging Nexus. ./tools/ci_download_console