-
-
Notifications
You must be signed in to change notification settings - Fork 24
48 lines (46 loc) · 1.47 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Build
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: "0 0 10 * 6"
jobs:
macos:
strategy:
matrix:
runner: [macos-latest, macos-13]
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Crystal
env:
HOMEBREW_NO_INSTALL_UPGRADE: 1
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
run: brew update && brew install crystal || true
- name: Build the binary
run: |
export LLVM_CONFIG="$(brew --prefix)/opt/llvm@19/bin/llvm-config"
shards build crystalline --release --no-debug -Dpreview_mt --stats --progress --ignore-crystal-version
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: crystalline_${{ matrix.runner == 'macos-latest' && 'arm64' || 'x86_64' }}-apple-darwin
path: ./bin/crystalline
linux:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Build the static binary
run: docker build -t crystalline .
- name: Copy binary to host
run: |
docker run -v $PWD:/app/host --rm crystalline:latest cp ./bin/crystalline ./host/crystalline
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: crystalline_x86_64-unknown-linux-musl
path: ./crystalline