Skip to content

Type declaration syntax #74

Type declaration syntax

Type declaration syntax #74

Workflow file for this run

name: Build
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
CARGO_NET_GIT_FETCH_WITH_CLI: true
CI: 1
RUST_BACKTRACE: short
RUSTFLAGS: "-D warnings -W unreachable-pub -W rust-2021-compatibility"
RUSTUP_MAX_RETRIES: 10
CHOO_VERSION: "0.1.3"
on:
pull_request:
branches: [ "master" ]
push:
branches: [ "master" ]
jobs:
get-choo:
name: "Get Choo"
runs-on: ubuntu-latest
outputs:
choo-cache-key: ${{ steps.restore.outputs.cache-primary-key }}
steps:
- name: Restore cache
id: restore
uses: actions/cache/restore@v4
with:
path: |
choo
.data.crown
key: choo-${{ runner.os }}-${{ env.CHOO_VERSION }}
- name: Download choo
if: ${{ (steps.restore.outputs.cache-hit != 'true') }}
run: |
curl -L -o choo https://github.com/zorp-corp/nockapp/releases/download/choo-$CHOO_VERSION/choo
chmod u+x choo
- name: Bootstrap Hoon
if: ${{ (steps.restore.outputs.cache-hit != 'true') }}
run: |
mkdir hoon
echo '%trivial' > hoon/trivial.hoon
./choo --new --arbitrary hoon/trivial.hoon
- name: Save cache
if: ${{ (steps.restore.outputs.cache-hit != 'true') }}
uses: actions/cache/save@v4
with:
path: |
choo
.data.crown
key: ${{ steps.restore.outputs.cache-primary-key }}
build:
name: "Build Jock Test executable"
runs-on: ubuntu-latest
needs: [get-choo]
outputs:
executable-artifact-id: ${{ steps.artifact-upload-step.outputs.artifact-id }}
steps:
- uses: actions/checkout@v4
- uses: zorp-corp/rust-cache@v2
with:
workspaces: ". -> target"
- name: Restore Choo cache
uses: actions/cache/restore@v4
with:
path: |
choo
.data.crown
key: ${{ needs.get-choo.outputs.choo-cache-key }}
fail-on-cache-miss: true
- name: Restore Hoon cache
id: restore-hoon
uses: actions/cache/restore@v4
with:
path: assets
key: hoon-${{ runner.os }}-choo-${{ env.CHOO_VERSION }}-${{ hashFiles('hoon/**') }}
- name: Build Jock Testing kernel
if: ${{ (steps.restore-hoon.outputs.cache-hit != 'true' ) }}
run: |
./choo hoon/main.hoon hoon
mv out.jam assets/jocktest.jam
- name: Save Hoon cache
if: ${{ (steps.restore-hoon.outputs.cache-hit != 'true' ) }}
uses: actions/cache/save@v4
with:
path: assets
key: ${{ steps.restore-hoon.outputs.cache-primary-key }}
# Test building and running are split for caching and build time tracking purposes
- name: Run hoon/nock tests
run: make release-test-all