Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add gcc toolchain #17

Merged
merged 1 commit into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/gcc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Build GCC toolchain
on:
workflow_dispatch:
inputs:
gcc_release:
required: true

jobs:
build_linux_x64:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: sudo apt update && sudo apt install -yqq libzstd-dev libisl-dev bisonc++ libisl-dev bison byacc libgmp-dev libmpfr-dev libmpc-dev flex m4
- name: Install multilib
run: sudo apt install -yqq gcc-multilib g++-multilib
- name: Checkout code
uses: actions/checkout@v4
with:
repository: "gcc.gnu.org/git/gcc.git"
ref: release/${{ inputs.gcc_release }}
- name: Build and install
env:
CXXFLAGS: -w
CFLAGS: -w
run: |
mkdir -p install/${{ inputs.gcc_release }}-linux-x86_64
./configure --with-static-standard-libraries \
--enable-gold --enable-languages=c,c++,lto \
--enable-lto --host=x86_64-pc-linux-gnu \
--with-isl --with-zstd --prefix=$PWD/install/${{ inputs.gcc_release }}-linux-x86_64
make -j2
make install

cd install

tar --zstd -cf ${{ inputs.gcc_release }}-linux-x86_64.tar.zst ${{ inputs.gcc_release }}-linux-x86_64
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
path: install/${{ inputs.gcc_release }}-linux-x86_64.tar.zst
name: linux-x86_64-toolchain

publish_release:
needs: ["build_linux_x64"]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
- name: Collect sha256 checksums
run: |
touch RELASE.txt
sha256sum linux-x86_64-toolchain/${{ inputs.gcc_release }}-linux-x86_64.tar.zst >> RELEASE.txt
- name: Create release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.RELEASE_TOKEN }}
body_path: RELEASE.txt
tag_name: ${{ inputs.gcc_release }}-${{ github.sha }}
name: GCC Toolchain ${{ inputs.gcc_release }}
prerelease: true
files: |
linux-x86_64-toolchain/${{ inputs.gcc_release }}-linux-x86_64.tar.zst
2 changes: 0 additions & 2 deletions .github/workflows/llvm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,3 @@ jobs:
files: |
linux-x86_64-toolchain/${{ inputs.llvm_tag }}-linux-x86_64.tar.zst
macos-x86_64-toolchain/${{ inputs.llvm_tag }}-macos-x86_64.tar.zst