Skip to content

Commit

Permalink
Merge pull request #5 from asdawej/asdawej-patch-1
Browse files Browse the repository at this point in the history
Set CI
  • Loading branch information
asdawej authored Dec 5, 2023
2 parents c632c9b + a167625 commit 89cd8a5
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 0 deletions.
127 changes: 127 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: build

on: [push, pull_request]

jobs:
build_base:
name: Build Base DLL
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Build Base DLL
run: |
g++ -O3 -std=c++17 -fconcepts -Wall -shared -fpic src/base/*.cpp src/std/*.cpp -I include -o base.dll
- name: Upload Base DLL
uses: actions/upload-artifact@v2
with:
name: base
path: base.dll

build_analyzer:
name: Build Analyzer DLL
needs: build_base
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Download Base DLL
uses: actions/download-artifact@v2
with:
name: base

- name: Build Analyzer DLL
run: |
g++ -O3 -std=c++17 -fconcepts -Wall -shared -fpic src/analyzer.cpp base.dll -I include -o analyzer.dll
- name: Upload Analyzer DLL
uses: actions/upload-artifact@v2
with:
name: analyzer
path: analyzer.dll

build_compiler:
name: Build Compiler DLL
needs: build_base
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Download Base DLL
uses: actions/download-artifact@v2
with:
name: base

- name: Build Compiler DLL
run: |
g++ -O3 -std=c++17 -fconcepts -Wall -shared -fpic src/compiler.cpp base.dll -I include -o compiler.dll
- name: Upload Compiler DLL
uses: actions/upload-artifact@v2
with:
name: compiler
path: compiler.dll

build_interpreter:
name: Build Interpreter DLL
needs: build_base
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Download Base DLL
uses: actions/download-artifact@v2
with:
name: base

- name: Build Interpreter DLL
run: |
g++ -O3 -std=c++17 -fconcepts -Wall -shared -fpic src/interpreter.cpp base.dll -I include -o interpreter.dll
- name: Upload Interpreter DLL
uses: actions/upload-artifact@v2
with:
name: interpreter
path: interpreter.dll

build_main:
name: Build Main EXE
needs: [build_analyzer, build_compiler, build_interpreter]
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Download Base DLL
uses: actions/download-artifact@v2
with:
name: base

- name: Download Analyzer DLL
uses: actions/download-artifact@v2
with:
name: analyzer

- name: Download Compiler DLL
uses: actions/download-artifact@v2
with:
name: compiler

- name: Download Interpreter DLL
uses: actions/download-artifact@v2
with:
name: interpreter

- name: Build Main EXE
run: |
g++ -O3 -std=c++17 -fconcepts -Wall src/main.cpp *.dll -I include -o tff.exe
15 changes: 15 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: format

on: [push, pull_request]

jobs:
clang-format-checking:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DoozyX/[email protected]
with:
source: '.'
extensions: 'c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx,i,ixx,ipp,i++'
clangFormatVersion: 14
inplace: False

0 comments on commit 89cd8a5

Please sign in to comment.