From f641285cdf6dbd2e9314ab8aac96fcacc95e7dea Mon Sep 17 00:00:00 2001 From: DeveloperC Date: Sat, 20 Apr 2024 03:01:52 +0100 Subject: [PATCH] BUILD: WORKING COMMIT - DELETE --- .github/workflows/continuous-integration.yml | 19 +++++++++++++++++++ Earthfile | 12 ++++++++++++ README.md | 2 +- ci/compile.sh | 6 ++++++ 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/continuous-integration.yml create mode 100755 ci/compile.sh diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml new file mode 100644 index 0000000..f2ee2fa --- /dev/null +++ b/.github/workflows/continuous-integration.yml @@ -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 diff --git a/Earthfile b/Earthfile index 7150714..be2d561 100644 --- a/Earthfile +++ b/Earthfile @@ -38,3 +38,15 @@ check-github-actions-workflows-linting: RUN go install github.com/rhysd/actionlint/cmd/actionlint@v1.6.26 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 diff --git a/README.md b/README.md index 897e6e0..4797b39 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/ci/compile.sh b/ci/compile.sh new file mode 100755 index 0000000..e2674c1 --- /dev/null +++ b/ci/compile.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +set -o errexit +set -o xtrace + +gcc -o "shellcode-generator" "src/shellcode-generator.c"