Skip to content

Instantly share code, notes, and snippets.

@onliniak
Last active April 9, 2020 23:33
Show Gist options
  • Save onliniak/e0b0fe75dc72fbb6e3d0f23f2f891e98 to your computer and use it in GitHub Desktop.
Save onliniak/e0b0fe75dc72fbb6e3d0f23f2f891e98 to your computer and use it in GitHub Desktop.
[FreeBSD] Build Crystal app with Cirrus CI
# https://cirrus-ci.com/task/4647371069980672
#
# Create static binary on FreeBSD
# Default FreeBSD's openssl = bug, build new version from source
#
# crystal + openssl + pkgconf = dependencies required to build.
# shards = package manager
# gmake = because I don't like standard Makefile
# Warning: When I try make std_spec compiler_spec on virtual machine with 2 threads of Ryzen5 1600 and 4gb ram, it killed my virtual machine.
#
# I will add auto-upload binary later
#
freebsd_instance:
image_family: freebsd-12-1
task:
install_script: pkg install -y crystal shards openssl pkgconf gmake
script: shards install && git clone https://github.com/crystal-lang/crystal && cd crystal && gmake && cd .. && ./crystal/bin/crystal build src/Server.cr --release --static --no-debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment