Merge pull request #1 from glguida/create_tarball #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GCC Toolchain Build | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- name: Install build-essential and prepare build | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
sudo mkdir -p /mnt/gcc_toolchain_install | |
sudo chown runner:runner /mnt/gcc_toolchain_install | |
- name: Populate toolchain | |
run: make populate INSTALLDIR=/mnt/gcc_toolchain_install | |
- name: Build RISC-V toolchain with -shared support | |
run: make riscv64-unknown-elf-gcc INSTALLDIR=/mnt/gcc_toolchain_install | |
- name: Build i686 toolchain | |
run: make i686-unknown-elf-gcc INSTALLDIR=/mnt/gcc_toolchain_install | |
- name: Build AMD64 toolchain | |
run: make amd64-unknown-elf-gcc INSTALLDIR=/mnt/gcc_toolchain_install | |
- name: Create tarball | |
run: | | |
du -s -h /mnt/gcc_toolchain_install | |
XZ_OPT="-e -T0" tar cJvf gcc_toolchain.tar.xz -C /mnt/ gcc_toolchain_install/ | |
- name: Upload toolchains | |
uses: actions/upload-artifact@v3 | |
if: success() | |
with: | |
name: gcc-toolchain | |
path: gcc_toolchain.tar.xz |