-
Notifications
You must be signed in to change notification settings - Fork 2
67 lines (64 loc) · 2.62 KB
/
build.yaml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
on: [push, pull_request]
name: ci
env:
DAY_OF_WEEK: Monday
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
include:
- os: windows-latest
libuv: v1.46.0
runs-on: ${{ matrix.os }}
steps:
- name: Prereqs Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
set -o pipefail
curl -sSfL https://github.com/leanprover/elan/releases/download/v1.4.2/elan-x86_64-unknown-linux-gnu.tar.gz | tar xz
./elan-init -y --default-toolchain none
echo "$HOME/.elan/bin" >> $GITHUB_PATH
sudo apt-get update
sudo apt-get install -y --no-install-recommends libuv1-dev clang
sudo update-alternatives --set cc /usr/bin/clang
- name: Set up Homebrew
if: matrix.os == 'macos-latest'
uses: Homebrew/actions/setup-homebrew@master
- name: Prereqs OSX
if: matrix.os == 'macos-latest'
run: brew install elan-init
- name: Add msys2 to path (Windows)
if: matrix.os == 'windows-latest'
run: |
Add-Content $env:GITHUB_PATH "C:\msys64\usr\bin"
Add-Content $env:GITHUB_PATH "C:\msys64\mingw64\bin"
Set-Content $env:GITHUB_ENV "PKG_CONFIG_PATH=C:\msys64\usr\lib\pkgconfig"
- name: Install gcc (Windows)
if: matrix.os == 'windows-latest'
run: pacman -v -S --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-pkg-config
- name: Build libuv (Windows)
if: matrix.os == 'windows-latest'
shell: bash
run: |
curl https://dist.libuv.org/dist/${{ matrix.libuv }}/libuv-${{ matrix.libuv }}.tar.gz | tar xvz
cmake -S libuv-${{ matrix.libuv }} -B build -DBUILD_TESTING=OFF
cmake --build build
# Add Windows system32 to path
sed -i 's/Libs:/Libs:\-LC:\/Windows\/system32/' build/libuv.pc
sed -i 's/ -luuid/ -lmsvcrt/' build/libuv.pc
# For some reason install needs dll from release.
cp -r build/Debug build/Release
# Run install
cmake --install build --prefix=/usr
- name: Install Elan (Windows)
if: matrix.os == 'windows-latest'
shell: bash
run: |
curl -sSfL https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh | sh -s -- -y --default-toolchain none
echo "$USERPROFILE\.elan\bin" >> $GITHUB_PATH
- uses: actions/checkout@v4
- name: Lake build
run: lake build