This repository was archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 107
78 lines (74 loc) · 2.53 KB
/
x86_64-apple-darwin-compiler.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: x86_64-apple-darwin compiler
on: push
env:
EPOCH: 0
FIREFLY_BUILD_TYPE: static
LLVM_LINK_LLVM_DYLIB: OFF
LLVM_VERSION: 15.0.7
CARGO_MAKE_TOOLCHAIN: nightly-2023-02-07
jobs:
compiler:
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.CARGO_MAKE_TOOLCHAIN }}
override: true
- name: Cache Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ github.workflow }}-${{ github.job }}-toolchain-${{ env.CARGO_MAKE_TOOLCHAIN }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo-make
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-make
- name: Cache LLVM
id: cache-llvm
uses: actions/cache@v2
with:
path: ~/.local/share/llvm/firefly
key: llvm-15.0.7
- name: Install LLVM
if: steps.cache-llvm.outputs.cache-hit != 'true'
run: |
mkdir -p ~/.local/share/llvm
pushd ~/.local/share/llvm
wget "https://github.com/llvm/llvm-project/releases/download/llvmorg-${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin21.0.tar.xz"
tar -xzf "clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin21.0.tar.xz"
mv "clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin21.0" firefly
popd
echo "$(~/.local/share/llvm/firefly/bin/llvm-config --cxxflags)"
echo "$(~/.local/share/llvm/firefly/bin/llvm-config --ldflags)"
echo "$(~/.local/share/llvm/firefly/bin/llvm-config --host-target)"
- name: Set LLVM_PREFIX
run: echo "LLVM_PREFIX=$HOME/.local/share/llvm/firefly" >> $GITHUB_ENV
- name: Install Ninja
run: brew install ninja
- name: Build Compiler
uses: actions-rs/cargo@v1
with:
command: make
args: firefly
- name: Add Compiler To Path
run: |
if [ -n "${GITHUB_PATH}" ]; then
echo "$PWD/bin" >> $GITHUB_PATH
else
echo "::add-path::${PWD}/bin"
fi
- name: Run compiler unit tests
uses: actions-rs/cargo@v1
with:
command: test
args: "-p firefly_intern -p firefly_parser -p firefly_target -p firefly_syntax_erl -p firefly_syntax_pp"
- name: Run literate tests
uses: actions-rs/cargo@v1
with:
command: make
args: test-lit