Skip to content

Commit 227841d

Browse files
ci: adding C Continuous Integration (CI) (#15)
1 parent f2db51a commit 227841d

File tree

4 files changed

+38
-1
lines changed

4 files changed

+38
-1
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Continuous Integration (CI)
2+
3+
on: pull_request
4+
5+
env:
6+
# Forcing Earthly to use colours, to make reading output easier.
7+
FORCE_COLOR: 1
8+
9+
jobs:
10+
compile:
11+
name: Compile
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Download Earthly v0.8.6.
15+
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'"
16+
- name: Checkout code.
17+
uses: actions/checkout@v3
18+
- name: Compile.
19+
run: earthly --ci +compile

Earthfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,15 @@ check-github-actions-workflows-linting:
3838
RUN go install github.com/rhysd/actionlint/cmd/actionlint@v1.6.26
3939
DO +COPY_CI_DATA
4040
RUN ./ci/check-github-actions-workflows-linting.sh
41+
42+
43+
COPY_SOURCECODE:
44+
COMMAND
45+
DO +COPY_CI_DATA
46+
COPY --dir "src/" "tests/" "./"
47+
48+
49+
compile:
50+
FROM gcc:13.2.0
51+
DO +COPY_SOURCECODE
52+
RUN ./ci/compile.sh

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NASM x86 Shellcode Generator
2-
[![Pipeline Status](https://gitlab.com/DeveloperC/nasm-x86-shellcode-generator/badges/master/pipeline.svg)](https://gitlab.com/DeveloperC/nasm-x86-shellcode-generator/-/pipelines)
2+
[![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)
33
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
44
[![License](https://img.shields.io/badge/License-AGPLv3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
55

ci/compile.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env sh
2+
3+
set -o errexit
4+
set -o xtrace
5+
6+
gcc -o "shellcode-generator" "src/shellcode-generator.c"

0 commit comments

Comments
 (0)