This repository has been archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 105
78 lines (74 loc) · 2.47 KB
/
x86_64-unknown-linux-gnu-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-unknown-linux-gnu compiler
on:
push:
paths-ignore:
- '*.md'
env:
FIREFLY_BUILD_TYPE: static
LLVM_LINK_LLVM_DYLIB: OFF
LLVM_VERSION: "15"
LLVM_PREFIX: /usr/lib/llvm-15
CARGO_MAKE_TOOLCHAIN: nightly-2023-02-07
jobs:
compiler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Env
run: |
echo "$(whoami)"
echo "$PWD/bin" >> $GITHUB_PATH
- name: Install Ninja
run: |
wget "https://github.com/ninja-build/ninja/releases/download/v1.9.0/ninja-linux.zip"
unzip ninja-linux.zip -d /usr/local/bin
rm ninja-linux.zip
- name: Install LLVM
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh "${LLVM_VERSION}"
sudo apt-get install -y "llvm-${LLVM_VERSION}" "libllvm${LLVM_VERSION}" "llvm-${LLVM_VERSION}-dev" "libmlir-${LLVM_VERSION}-dev" "libunwind-${LLVM_VERSION}-dev" "llvm-${LLVM_VERSION}-runtime"
if ! "${LLVM_PREFIX}/bin/llvm-config" --prefix; then
echo "$("${LLVM_PREFIX}/bin/llvm-config" --prefix)"
exit 1
fi
echo "$("${LLVM_PREFIX}/bin/llvm-config" --cxxflags)"
echo "$("${LLVM_PREFIX}/bin/llvm-config" --ldflags)"
echo "$("${LLVM_PREFIX}/bin/llvm-config" --host-target)"
- 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:
toolchain: ${{ env.CARGO_MAKE_TOOLCHAIN }}
command: install
args: cargo-make
- name: Build Compiler
uses: actions-rs/cargo@v1
env:
CC: clang
CXX: clang++
with:
command: make
args: firefly
- 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