Skip to content

ci: adding C Continuous Integration (CI) #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Continuous Integration (CI)

on: pull_request

env:
# Forcing Earthly to use colours, to make reading output easier.
FORCE_COLOR: 1

jobs:
compile:
name: Compile
runs-on: ubuntu-latest
steps:
- name: Download Earthly v0.8.6.
run: "sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/download/v0.8.6/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly'"
- name: Checkout code.
uses: actions/checkout@v3
- name: Compile.
run: earthly --ci +compile
12 changes: 12 additions & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,15 @@ check-github-actions-workflows-linting:
RUN go install github.com/rhysd/actionlint/cmd/[email protected]
DO +COPY_CI_DATA
RUN ./ci/check-github-actions-workflows-linting.sh


COPY_SOURCECODE:
COMMAND
DO +COPY_CI_DATA
COPY --dir "src/" "tests/" "./"


compile:
FROM gcc:13.2.0
DO +COPY_SOURCECODE
RUN ./ci/compile.sh
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# NASM x86 Shellcode Generator
[![Pipeline Status](https://gitlab.com/DeveloperC/nasm-x86-shellcode-generator/badges/master/pipeline.svg)](https://gitlab.com/DeveloperC/nasm-x86-shellcode-generator/-/pipelines)
[![Continuous Integration (CI)](https://github.com/DeveloperC286/nasm-x86-shellcode-generator/actions/workflows/continuous-integration.yml/badge.svg)](https://github.com/DeveloperC286/nasm-x86-shellcode-generator/actions/workflows/continuous-integration.yml)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
[![License](https://img.shields.io/badge/License-AGPLv3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)

Expand Down
6 changes: 6 additions & 0 deletions ci/compile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh

set -o errexit
set -o xtrace

gcc -o "shellcode-generator" "src/shellcode-generator.c"