Skip to content

Commit 447f31c

Browse files
💚 Made basic CI (#42)
* fixed missing directory * 💚 Created basic CI Only works on linux currently TODO: Add windows and mac pipelines TODO: Add lint checks TODO: Add deployment --------- Co-authored-by: Mchan2003 <[email protected]>
1 parent bc2c017 commit 447f31c

File tree

4 files changed

+60
-2
lines changed

4 files changed

+60
-2
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: 'Build and Test SAFE'
2+
description: 'Compile and run unit tests'
3+
4+
inputs:
5+
conan-path:
6+
description: 'Path to Conan executable'
7+
required: true
8+
9+
10+
runs:
11+
using: "composite"
12+
steps:
13+
- name: Setup Conan Profile
14+
shell: bash
15+
run: |
16+
${{ inputs.conan-path }} remote add libhal-trunk https://libhal.jfrog.io/artifactory/api/conan/trunk-conan
17+
${{ inputs.conan-path }} config install -sf profiles/x86_64/linux/ -tf profiles https://github.com/libhal/conan-config.git
18+
19+
- name: Build Program
20+
shell: bash
21+
run: ${{ inputs.conan-path }} build . -s build_type=Release -b missing

.github/workflows/ubuntu-build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Setup Conan/LLVM/CMake on Ubuntu
2+
3+
on: [push, workflow_dispatch]
4+
5+
jobs:
6+
ci:
7+
runs-on: ubuntu-22.04
8+
steps:
9+
- name: Checkout repository
10+
uses: actions/checkout@v4
11+
12+
- name: Set up Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.x"
16+
17+
- name: Show current user
18+
run: whoami
19+
20+
- name: Install LLVM/Clang 20 via llvm.sh
21+
run: |
22+
sudo apt update
23+
sudo apt install -y wget lsb-release python3-pip software-properties-common gnupg pipx
24+
wget https://apt.llvm.org/llvm.sh
25+
chmod +x llvm.sh
26+
sudo ./llvm.sh 17
27+
sudo apt install libc++-17-dev libc++abi-17-dev -y
28+
29+
- name: Install pipx, Conan, and CMake
30+
run: |
31+
pipx install "conan>=2.2.2" cmake
32+
pipx ensurepath
33+
34+
- name: Build
35+
uses: ./.github/actions/build-and-test
36+
with:
37+
conan-path: conan

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def generate(self):
4141
"""
4242
def build_requirements(self):
4343
self.tool_requires("cmake/[^3.27.1]")
44-
self.test_requires("boost-ext-ut/2.1.0")
4544
self.tool_requires("libhal-cmake-util/[^4.0.5]")
45+
self.test_requires("boost-ext-ut/2.1.0")
4646

4747
"""
4848
Manages the layout of where build artifacts will go.

include/elf_parser.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
#pragma once
1313

14-
#include <elf.h>
1514
#include <fcntl.h>
1615
#include <unistd.h>
1716

@@ -20,6 +19,7 @@
2019

2120
#include <print>
2221
#include <string_view>
22+
#include <system_error>
2323
#include <unordered_map>
2424
#include <variant>
2525
#include <vector>

0 commit comments

Comments
 (0)