-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
35 lines (35 loc) · 1.22 KB
/
action.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
name: "Setup Developer Jule Compiler"
description: "Setup Developer Jule Compiler for the Official CI actions."
author: "mertcandav"
branding:
icon: code
color: gray-dark
runs:
using: "composite"
steps:
- name: Get IR
shell: bash
run: |
if [[ "$OSTYPE" == "darwin"* ]]; then
curl -o ir.cpp https://raw.githubusercontent.com/julelang/julec-ir/main/src/darwin-amd64.cpp
elif [[ "$RUNNER_OS" == "Windows" ]]; then
curl -o ir.cpp https://raw.githubusercontent.com/julelang/julec-ir/main/src/windows-amd64.cpp
elif [[ "$RUNNER_OS" == "Linux" ]]; then
curl -o ir.cpp https://raw.githubusercontent.com/julelang/julec-ir/main/src/linux-amd64.cpp
else
echo "Unsupported operating system."
exit 1
fi
- name: Build Jule Compiler
shell: bash
run: |
mkdir bin
if [[ "$RUNNER_OS" == "Windows" ]]; then
clang++ -O0 --std=c++17 -Wno-everything -o bin/julec.exe ir.cpp -lws2_32 -lshell32
else
clang++ -O0 --std=c++17 -Wno-everything -o bin/julec ir.cpp
fi
- name: Add Compiler to the PATH
shell: bash
run: |
echo "export PATH=\$PATH:./bin/" >> $GITHUB_PATH