Skip to content

Commit

Permalink
-Add GitHub Actions
Browse files Browse the repository at this point in the history
-Install libgmp-dev for compiling GDB 11+
  • Loading branch information
lordmilko committed Nov 1, 2023
1 parent 88c5c8c commit 0aed528
Show file tree
Hide file tree
Showing 3 changed files with 117 additions and 3 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: docker

on:
push:
branches: [ "master" ]
paths:
- Dockerfile
- i686-elf-tools.sh
pull_request:
branches: [ "master" ]
paths:
- Dockerfile
- i686-elf-tools.sh

jobs:
push_to_registry:
name: Update Docker Image
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v4

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: lordmilko/i686-elf-tools
tags: |
type=raw,value=latest
- name: Build and push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
69 changes: 69 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: release

on:
workflow_dispatch:
inputs:
gcc_version:
required: true
type: string

binutils_version:
required: true
type: string

gdb_version:
required: true
type: string

jobs:
i686:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: build
run: docker run -v "${{ github.workspace }}:/root" --rm lordmilko/i686-elf-tools -parallel -gv ${{ inputs.gcc_version }} -bv ${{ inputs.binutils_version }} -dv ${{ inputs.gdb_version }}

- uses: actions/upload-artifact@v3
with:
name: i686-elf-tools
path: ${{ github.workspace }}/build-i686-elf/*.zip

x86_64:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: build
run: docker run -v "${{ github.workspace }}:/root" --rm lordmilko/i686-elf-tools -parallel -gv ${{ inputs.gcc_version }} -bv ${{ inputs.binutils_version }} -dv ${{ inputs.gdb_version }} -64

- uses: actions/upload-artifact@v3
with:
name: x86_64-elf-tools
path: ${{ github.workspace }}/build-x86_64-elf/*.zip

release:
runs-on: ubuntu-latest
needs: [i686, x86_64]

steps:
- uses: actions/download-artifact@v3

- name: release
uses: softprops/action-gh-release@v0.1.15
with:
name: GCC ${{ inputs.gcc_version }}
tag_name: ${{ inputs.gcc_version }}
draft: true
files: '**/*.zip'
body: |
i686/x86_64-elf Win32/Linux binaries
-GCC ${{ inputs.gcc_version }}
-Binutils ${{ inputs.binutils_version }}
-GDB ${{ inputs.gdb_version }}
* 🤖This modern version of i686-elf-tools has automatically been built by GitHub Actions
* ⚠️It is completely untested, and merely provided for your convenience in the event that you would prefer to use a modern version of the toolchain
* 🚀Having said all this, the [original release](https://github.com/lordmilko/i686-elf-tools/releases/tag/7.1.0) of the toolchain has been thoroughly tested, and is generally recommended unless you specifically know that you need to use a newer version
7 changes: 4 additions & 3 deletions i686-elf-tools.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# i686-elf-tools.sh
# v1.3.2
# v1.3.3

# Define Global Variables

Expand Down Expand Up @@ -114,6 +114,7 @@ function installPackages {
intltool
libffi-dev
libgdk-pixbuf2.0-dev
libgmp-dev
libtool
libltdl-dev
libssl-dev
Expand Down Expand Up @@ -161,9 +162,9 @@ function installMXE {
sudo -E git clone https://github.com/mxe/mxe.git
cd mxe
if [[ $PARALLEL == true ]]; then
sudo make -j4 gcc
sudo make -j4 gcc gmp
else
sudo make gcc
sudo make gcc gmp
fi
else
echoColor " MXE is already installed. You'd better make sure that you've previously made MXE's gcc! (/opt/mxe/usr/bin/i686-w64-mingw32.static-gcc)"
Expand Down

0 comments on commit 0aed528

Please sign in to comment.