Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,15 @@ jobs:
- name: Checkout code
uses: actions/checkout@v6

- name: Install Crystal
- name: Install Crystal (Linux)
if: matrix.target == 'linux-x86_64'
uses: crystal-lang/install-crystal@v1
with:
crystal: latest

- name: Install Crystal and OpenSSL (macOS)
if: matrix.target == 'darwin-arm64'
run: brew install crystal openssl@3

- name: Cache shards
uses: actions/cache@v4
Expand Down Expand Up @@ -70,6 +75,16 @@ jobs:
./amber new --help
./amber-lsp --help

- name: Reject retired OpenSSL linkage (macOS)
if: matrix.target == 'darwin-arm64'
run: |
otool -L amber
otool -L amber-lsp
! otool -L amber amber-lsp | grep -F 'openssl@1.1'

- name: Smoke test generated Amber V2 web app
run: scripts/smoke_generated_web.sh ./amber

- name: Upload build artifacts
uses: actions/upload-artifact@v7
if: github.event_name == 'workflow_dispatch'
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ jobs:
- name: Install dependencies
run: shards install

- name: Check Amber V2 beta contract
run: scripts/check_beta_contract.sh

- name: Check code formatting
run: crystal tool format --check src spec

Expand Down Expand Up @@ -95,6 +98,16 @@ jobs:
with:
crystal: latest

- name: Restore tested shard cache
uses: actions/cache@v4
with:
path: |
~/.cache/shards
./lib
key: ${{ runner.os }}-shards-${{ hashFiles('shard.lock') }}
restore-keys: |
${{ runner.os }}-shards-

- name: Install dependencies
run: shards install

Expand Down
27 changes: 26 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,25 @@ jobs:
with:
ref: ${{ github.event.release.tag_name || github.event.inputs.ref }}

- name: Install Crystal
- name: Install Crystal (Linux)
if: matrix.target == 'linux-x86_64'
uses: crystal-lang/install-crystal@v1
with:
crystal: latest

- name: Install Crystal and OpenSSL (macOS)
if: matrix.target == 'darwin-arm64'
run: brew install crystal openssl@3

- name: Verify release versions agree
run: |
shard_version="$(awk '/^version:/ { print $2; exit }' shard.yml)"
cli_version="$(sed -n 's/.*VERSION = "\([^"]*\)".*/\1/p' src/amber_cli.cr | head -1)"
test "$shard_version" = "$cli_version"
requested_ref="${{ github.event.release.tag_name || github.event.inputs.ref }}"
if [[ "$requested_ref" == v* ]]; then
test "v$shard_version" = "$requested_ref"
fi

- name: Install dependencies
run: |
Expand Down Expand Up @@ -67,6 +82,16 @@ jobs:
file amber-lsp
test -x amber-lsp

- name: Reject retired OpenSSL linkage (macOS)
if: matrix.target == 'darwin-arm64'
run: |
otool -L amber
otool -L amber-lsp
! otool -L amber amber-lsp | grep -F 'openssl@1.1'

- name: Smoke test generated Amber V2 web app
run: scripts/smoke_generated_web.sh ./amber

- name: Create archive
run: |
mkdir -p dist
Expand Down
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Thumbs.db

# Generated documentation (keep structure, ignore generated content)
/docs/**
!/docs/README.md
!/docs/*.md
!/docs/.gitkeep

# Build artifacts
Expand All @@ -29,6 +29,4 @@ Thumbs.db
/target/
/dist/

# Libraries don't need dependency lock
# Dependencies will be locked in applications that use them
/shard.lock
# The CLI is a distributed executable; commit shard.lock for reproducible builds.
Loading
Loading