Skip to content

Commit

Permalink
Merge pull request #2 from Unam3dd/1-feat-implement-tests-and-cicd-en…
Browse files Browse the repository at this point in the history
…vironment

1 feat implement tests and cicd environment
  • Loading branch information
Unam3dd authored May 26, 2024
2 parents 991aa5f + 3970006 commit b3cbba9
Show file tree
Hide file tree
Showing 29 changed files with 1,814 additions and 96 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Ubuntu-Latest GCC - Build Release

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

permissions:
contents: write
actions: write
id-token: write
attestations: write
packages: write
deployments: write

jobs:

build:
runs-on: [ubuntu-latest]
steps:
- name: Checkout repository ${{ github.repository }} on a branch ${{ github.ref_name }} triggered by ${{ github.event_name }}
uses: actions/checkout@v4

- run: "echo the ${{ github.repository }} has been cloned in the container !"

- name: 🔄 Installing task...
uses: arduino/setup-task@v2
with:
version: 3.x

- uses: actions/setup-python@v5

- name: 🔄 Installing Meson package build system...
run: pip install meson

- name: 🔄 Installing Dependencies...
run: |
sudo apt-get update
echo "📦 Installing libcriterion-dev, Ninja, GCC New Version"
sudo apt-get install -y libcriterion-dev ninja-build gcc-12
sudo ln -s -f /usr/bin/gcc-12 /usr/bin/gcc
echo "✅ Dependencies installed!"
- name: Run build release task...
run: |
echo "🏗️ Setting up Meson build system..."
task build fclean
echo "🎉 Build completed with Meson!"
deployments:
runs-on: [ubuntu-latest]
needs: build
steps:
- name: Checkout repository ${{ github.repository }} on a branch ${{ github.ref_name }} triggered by ${{ github.event_name }}
uses: actions/checkout@v4

- run: "echo the ${{ github.repository }} has been cloned in the container !"

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: etheria-std
path: .
61 changes: 61 additions & 0 deletions .github/workflows/codeQL.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CodeQL

on: push

permissions:
actions: read
contents: read
security-events: write

jobs:

analyze:
runs-on: [ubuntu-latest]

strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
build-mode: manual

steps:
- name: Checkout repository ${{ github.repository }} on a branch ${{ github.ref_name }} triggered by ${{ github.event_name }}
uses: actions/checkout@v4

- run: "echo the ${{ github.repository }} has been cloned in the container !"

- name: 🔄 Installing task...
uses: arduino/setup-task@v2
with:
version: 3.x

- uses: actions/setup-python@v5

- name: 🔄 Installing Meson package build system...
run: pip install meson

- name: 🔄 Installing Dependencies...
run: |
sudo apt-get update
echo "📦 Installing libcriterion-dev, Ninja, GCC New Version"
sudo apt-get install -y libcriterion-dev ninja-build gcc-12
sudo ln -s -f /usr/bin/gcc-12 /usr/bin/gcc
echo "✅ Dependencies installed!"
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Run build release task...
run: |
echo "🏗️ Setting up Meson build system..."
task build
echo "🎉 Build completed with Meson!"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: ${{ matrix.language }}
44 changes: 44 additions & 0 deletions .github/workflows/memcpy_naive_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Ubuntu - Memcpy Naive implementation Tests

on: push

permissions:
contents: write

jobs:
build:
runs-on: [ubuntu-latest]
steps:
- name: Checkout repository ${{ github.repository }} on a branch ${{ github.ref_name }} triggered by ${{ github.event_name }}
uses: actions/checkout@v4

- run: "echo the ${{ github.repository }} has been cloned in the container !"

- name: 🔄 Installing task...
uses: arduino/setup-task@v2
with:
version: 3.x

- uses: actions/setup-python@v5

- name: 🔄 Installing Meson package build system...
run: pip install meson

- name: 🔄 Installing Dependencies...
run: |
sudo apt-get update
echo "📦 Installing libcriterion-dev, Ninja, GCC New Version"
sudo apt-get install -y libcriterion-dev ninja-build gcc-12
sudo ln -s -f /usr/bin/gcc-12 /usr/bin/gcc
echo "✅ Dependencies installed!"
- name: Build tests
run: |
echo "🏗️ Setting up Meson build system..."
task build-tests
echo "🎉 Build completed with Meson!"
- name: Run test memcpy naive tests
run: |
echo "🏗️ Run naive memcpy tests..."
task run-test-suite -- $(task list-tests | grep "test_memcpy_naive")
44 changes: 44 additions & 0 deletions .github/workflows/types_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Ubuntu - Types Tests

on: push

permissions:
contents: write

jobs:
build:
runs-on: [ubuntu-latest]
steps:
- name: Checkout repository ${{ github.repository }} on a branch ${{ github.ref_name }} triggered by ${{ github.event_name }}
uses: actions/checkout@v4

- run: "echo the ${{ github.repository }} has been cloned in the container !"

- name: 🔄 Installing task...
uses: arduino/setup-task@v2
with:
version: 3.x

- uses: actions/setup-python@v5

- name: 🔄 Installing Meson package build system...
run: pip install meson

- name: 🔄 Installing Dependencies...
run: |
sudo apt-get update
echo "📦 Installing libcriterion-dev, Ninja, GCC New Version"
sudo apt-get install -y libcriterion-dev ninja-build gcc-12
sudo ln -s -f /usr/bin/gcc-12 /usr/bin/gcc
echo "✅ Dependencies installed!"
- name: Build tests
run: |
echo "🏗️ Setting up Meson build system..."
task build-tests
echo "🎉 Build completed with Meson!"
- name: Run Types tests
run: |
echo "🏗️ Setting up Meson build system..."
task run-test-suite -- $(task list-tests | grep "test_types")
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.cache
compile_commands.json
build
dist
./tests/output

# Prerequisites
*.d

Expand Down
Loading

0 comments on commit b3cbba9

Please sign in to comment.