diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000..aef544d --- /dev/null +++ b/.github/workflows/docker.yml @@ -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 }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..425bb86 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 \ No newline at end of file diff --git a/i686-elf-tools.sh b/i686-elf-tools.sh index 51b89a2..8dfadd4 100755 --- a/i686-elf-tools.sh +++ b/i686-elf-tools.sh @@ -1,7 +1,7 @@ #!/bin/bash # i686-elf-tools.sh -# v1.3.2 +# v1.3.3 # Define Global Variables @@ -114,6 +114,7 @@ function installPackages { intltool libffi-dev libgdk-pixbuf2.0-dev + libgmp-dev libtool libltdl-dev libssl-dev @@ -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)"