mirror of
https://github.com/brain-hackers/cegcc-build.git
synced 2026-04-20 08:56:59 +09:00
Compare commits
9 Commits
2022-04-11
...
2026-04-14
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40fcf2adbe | ||
|
|
deb577f9ee | ||
|
|
919fb9be91 | ||
|
|
50faa95938 | ||
|
|
bc9331f069 | ||
|
|
b15b33902b | ||
|
|
cebe6feddd | ||
|
|
235bdcb79b | ||
|
|
d11d956452 |
101
.github/workflows/build.yml
vendored
101
.github/workflows/build.yml
vendored
@@ -6,69 +6,64 @@ on:
|
|||||||
tags: '*'
|
tags: '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
create_release:
|
|
||||||
name: Create release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
submodules: false
|
|
||||||
- name: Generate release name
|
|
||||||
id: release_name
|
|
||||||
# https://github.community/t/how-to-get-just-the-tag-name/16241/4
|
|
||||||
run: echo ::set-output name=name::${GITHUB_REF/refs\/*s\//}
|
|
||||||
- name: Create release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
tag_name: ${{ steps.release_name.outputs.name }}
|
|
||||||
release_name: ${{ steps.release_name.outputs.name }}
|
|
||||||
body: ''
|
|
||||||
draft: false
|
|
||||||
prerelease: true
|
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build (${{ matrix.arch }})
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ${{ matrix.runner }}
|
||||||
needs: [create_release]
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- arch: x86_64
|
||||||
|
runner: ubuntu-24.04
|
||||||
|
- arch: aarch64
|
||||||
|
runner: ubuntu-24.04-arm
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Make /opt writable and create dir
|
- name: Make /opt writable and create dir
|
||||||
run: sudo chown "$(whoami):$(whoami)" /opt && mkdir /opt/cegcc
|
run: sudo chown "$(whoami):$(whoami)" /opt && mkdir /opt/cegcc
|
||||||
- name: Workaround for apt update failure
|
|
||||||
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt-get update
|
||||||
sudo apt install build-essential bison flex m4 libgmp-dev libmpc-dev libmpfr-dev
|
sudo apt-get install -y build-essential bison flex m4 libgmp-dev libmpc-dev libmpfr-dev zip
|
||||||
- name: Build cegcc
|
- name: Build cegcc
|
||||||
run: |
|
run: |
|
||||||
mkdir build
|
mkdir build
|
||||||
cd build
|
cd build
|
||||||
../build.sh -j4
|
../build.sh -j4
|
||||||
- name: Setup releases
|
cd /opt/cegcc
|
||||||
id: release_name
|
find . | xargs file | grep "not stripped" | grep -oE '^[^:]+' | xargs strip
|
||||||
run: |
|
|
||||||
export DIR=$(pwd)
|
|
||||||
ls -l /opt/cegcc/
|
|
||||||
cd /opt
|
cd /opt
|
||||||
zip -r $DIR/cegcc.zip cegcc
|
zip -r "$GITHUB_WORKSPACE/cegcc-${{ matrix.arch }}.zip" cegcc
|
||||||
- name: Generate archive name
|
- name: Upload artifact
|
||||||
id: archive_name
|
uses: actions/upload-artifact@v4
|
||||||
run: echo ::set-output name=name::cegcc-${GITHUB_REF/refs\/*s\//}
|
|
||||||
- name: Upload cegcc.zip
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ needs.create_release.outputs.upload_url }}
|
name: cegcc-${{ matrix.arch }}
|
||||||
asset_path: cegcc.zip
|
path: cegcc-${{ matrix.arch }}.zip
|
||||||
asset_name: ${{ steps.archive_name.outputs.name }}.zip
|
|
||||||
asset_content_type: application/zip
|
release:
|
||||||
|
name: Create release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [build]
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- name: Download artifacts
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
- name: Generate release name
|
||||||
|
id: release_name
|
||||||
|
run: echo "name=${GITHUB_REF#refs/*/}" >> "$GITHUB_OUTPUT"
|
||||||
|
- name: Rename artifacts
|
||||||
|
run: |
|
||||||
|
TAG="${GITHUB_REF#refs/*/}"
|
||||||
|
mv cegcc-x86_64/cegcc-x86_64.zip "cegcc-x86_64-${TAG}.zip"
|
||||||
|
mv cegcc-aarch64/cegcc-aarch64.zip "cegcc-aarch64-${TAG}.zip"
|
||||||
|
- name: Create release and upload assets
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
name: ${{ steps.release_name.outputs.name }}
|
||||||
|
prerelease: true
|
||||||
|
files: |
|
||||||
|
cegcc-x86_64-${{ steps.release_name.outputs.name }}.zip
|
||||||
|
cegcc-aarch64-${{ steps.release_name.outputs.name }}.zip
|
||||||
|
|||||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -6,7 +6,7 @@
|
|||||||
url = ../../MaxKellermann/binutils-gdb
|
url = ../../MaxKellermann/binutils-gdb
|
||||||
[submodule "gcc"]
|
[submodule "gcc"]
|
||||||
path = gcc
|
path = gcc
|
||||||
url = ../../MaxKellermann/gcc
|
url = ../../brain-hackers/gcc
|
||||||
[submodule "mingw"]
|
[submodule "mingw"]
|
||||||
path = mingw
|
path = mingw
|
||||||
url = ../../MaxKellermann/mingwrt
|
url = ../../brain-hackers/mingwrt
|
||||||
|
|||||||
1
build.sh
1
build.sh
@@ -216,6 +216,7 @@ function configure_module()
|
|||||||
function configure_host_module()
|
function configure_host_module()
|
||||||
{
|
{
|
||||||
configure_module "$@" \
|
configure_module "$@" \
|
||||||
|
--build=$(gcc -dumpmachine) \
|
||||||
--host=${HOST} \
|
--host=${HOST} \
|
||||||
--target=${TARGET}
|
--target=${TARGET}
|
||||||
}
|
}
|
||||||
|
|||||||
2
gcc
2
gcc
Submodule gcc updated: a32a4bae1d...82b837511c
2
mingw
2
mingw
Submodule mingw updated: cd5f3e6465...8ebe54a861
Reference in New Issue
Block a user