urbit/.github/workflows/shared.yml

98 lines
2.7 KiB
YAML
Raw Normal View History

name: vere
on:
workflow_call:
inputs:
upload:
description: 'upload binaries to gcp'
type: boolean
default: false
required: false
pace:
description: 'release pace'
type: string
default: 'edge'
required: false
2023-03-23 18:28:40 +03:00
next:
2023-03-28 18:03:26 +03:00
description: 'next kelvin version branch name'
2023-03-23 18:28:40 +03:00
type: string
default: null
required: false
secrets:
CACHIX_AUTH_TOKEN:
2022-06-03 09:13:40 +03:00
required: false
GCP_CREDENTIALS:
required: false
GCS_SERVICE_ACCOUNT_KEY:
2022-06-03 09:13:40 +03:00
required: false
GCS_PROJECT:
2022-06-03 09:13:40 +03:00
required: false
workflow_dispatch:
inputs:
upload:
description: 'upload binaries to gcp'
type: boolean
default: false
required: false
pace:
description: 'release pace'
type: choice
options:
- edge
- soon
- live
jobs:
urbit:
strategy:
fail-fast: false
matrix:
include:
2022-11-11 06:44:05 +03:00
- { os: ubuntu-latest, type: linux }
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
# We only want the extra nix config on linux, where it is necessary
# for the docker build. We don't want in on Mac, where it isn't but
# it breaks the nix install. The two `if` clauses should be mutually
# exclusive
- uses: cachix/install-nix-action@v20
with:
extra_nix_config: |
system-features = nixos-test benchmark big-parallel kvm
2022-11-11 06:44:05 +03:00
if: ${{ matrix.type == 'linux' }}
- uses: cachix/install-nix-action@v20
if: ${{ matrix.os != 'ubuntu-latest' }}
- uses: cachix/cachix-action@v10
with:
name: ares
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
- if: ${{ matrix.os == 'ubuntu-latest' }}
name: run urbit-tests
run: |
cp -RL tests pkg/arvo/tests
2023-03-28 22:37:44 +03:00
if [[ ${{ inputs.next }} == "next/kelvin/"* ]]; then
2023-03-28 18:03:26 +03:00
next=$(echo ${{ inputs.next }} | sed 's/[^0-9]//g')
base="https://bootstrap.urbit.org/vere/next/kelvin/${next}"
2023-03-28 22:55:21 +03:00
elif [[ ${{ github.ref_name }} == "next/kelvin"* ]]; then
next=$(echo ${{ github.ref_name }} | sed 's/[^0-9]//g')
2023-03-28 22:37:44 +03:00
base="https://bootstrap.urbit.org/vere/next/kelvin/${next}"
else
base="https://bootstrap.urbit.org/vere/${{ inputs.pace }}"
fi
2023-03-23 17:16:29 +03:00
vere=$(curl ${base}/last)
url="$(echo ${base}/v${vere}/vere-v${vere}-linux-x86_64)"
2023-03-04 19:41:55 +03:00
echo $vere
echo $url
2023-01-19 01:48:29 +03:00
# put in .jam so it doesn't crash when it gets -A'd in
2023-01-19 23:34:34 +03:00
curl -Lo pkg/arvo/vere.jam "$url"
chmod +x pkg/arvo/vere.jam
nix-build -A urbit-tests