Skip to content

Add anchor-test to initialise and build a sample app #5

Add anchor-test to initialise and build a sample app

Add anchor-test to initialise and build a sample app #5

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
test:
name: Test Solana & Anchor CLI
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
os: [ubuntu-24.04, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-13, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Enable Nix Flakes
run: |
echo "experimental-features = nix-command flakes" | sudo tee -a /etc/nix/nix.conf
sudo systemctl restart nix-daemon || true
- name: Enable Cachix
uses: cachix/cachix-action@v16
with:
name: solana-nix
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Test Solana CLI
run: |
nix run .#solana-cli -- --version
- name: Test Anchor CLI
run: |
nix run .#anchor-cli -- --version
- name: Test Anchor Program
run: |
nix build .#anchor-test -L --impure --option sandbox false