Fix tag names #7
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: build and cache | |
on: push | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
nix-check: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v4 | |
- name: Install nix | |
uses: cachix/install-nix-action@v27 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.22.1/install | |
- name: Use GitHub cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Check Nix formatting | |
run: nix fmt . -- --check | |
- name: Check Nix flake | |
run: nix flake check --all-systems | |
script-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: azohra/shell-linter@latest | |
- name: Test bump-holochain.sh | |
run: | | |
MINOR_VERSION=$(./scripts/bump-holochain.sh main-0.1 false | tail -n 1) | |
if [[ "$MINOR_VERSION" != "holochain-0.1.8" ]]; then | |
echo "bump.sh failed to find 0.1.8: [${MINOR_VERSION}]" | |
exit 1 | |
fi | |
RC_VERSION=$(./scripts/bump-holochain.sh main-0.1-rc false | tail -n 1) | |
if [[ "$RC_VERSION" != "holochain-0.1.7-rc.0" ]]; then | |
echo "bump.sh failed to find 0.1.7-rc.0: [${RC_VERSION}]" | |
exit 1 | |
fi | |
CURRENT_VERSION=$(./scripts/bump-holochain.sh main false | tail -n 1) | |
if [[ "$CURRENT_VERSION" != holochain-0.4.*dev* ]]; then | |
echo "bump.sh failed to find current version: [${CURRENT_VERSION}]" | |
exit 1 | |
fi | |
build: | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, macos-13 ] | |
packages: | |
- [ holochain, hc, hc-run-local-services, hc-sandbox, hcterm ] | |
- [ lair-keystore ] | |
- [ hc-launch ] | |
- [ hc-scaffold ] | |
include: | |
- os: ubuntu-latest | |
template: holonix-default | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- name: Print platform information | |
run: uname -ms | |
- name: Check out source code | |
uses: actions/checkout@v4 | |
- name: Install nix | |
uses: cachix/install-nix-action@v27 | |
with: | |
install_url: https://releases.nixos.org/nix/nix-2.22.1/install | |
- name: Use GitHub cache | |
uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: Run nix app | |
run: | | |
echo '${{ toJSON(matrix.packages) }}' | jq -r '.[]' | xargs -I% nix run .#% -- --version | |
- name: Extract branch name | |
shell: bash | |
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | |
id: extract_branch | |
- name: Init from template | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
run: | | |
cd $(mktemp -d) | |
echo "Fetching template from branch ${{ steps.extract_branch.outputs.branch }}" | |
nix flake init -t "github:holochain/holonix/${{ steps.extract_branch.outputs.branch }}#${{ matrix.template }}" | |
nix develop -c holochain --version | |
# - name: Setup tmate session | |
# if: failure() | |
# uses: mxschmitt/action-tmate@v3 |