Skip to content

Merge pull request #2 from netbsduser/m68k #10

Merge pull request #2 from netbsduser/m68k

Merge pull request #2 from netbsduser/m68k #10

Workflow file for this run

name: Build and install GCC headers
on:
push:
branches:
- 'trunk'
jobs:
install-headers:
strategy:
matrix:
target_arch: [i686, x86_64, aarch64, loongarch64, riscv64, m68k]
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- name: Install dependencies
run: pacman --noconfirm -Syu && pacman --needed --noconfirm -S base-devel git autoconf automake wget
- name: Check out repository code
uses: actions/checkout@v4
- name: Git config
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Build toolchain
run: |
set -ex
TARGET="${{matrix.target_arch}}-elf" ./make_toolchain.sh
- name: Move headers
run: |
set -ex
mkdir -p ${{matrix.target_arch}}
rm -rf ${{matrix.target_arch}}/include
mv toolchain/include/c++/* ${{matrix.target_arch}}/include
cp -rp ${{matrix.target_arch}}/include/${{matrix.target_arch}}-elf/* ${{matrix.target_arch}}/include/
rm -rf ${{matrix.target_arch}}/include/${{matrix.target_arch}}-elf
for f in patches/*; do \
( cd ${{matrix.target_arch}} && patch -p0 <../$f ); \
done
- name: Push
run: |
set -ex
git config user.name 'mintsuki'
git config user.email 'mintsuki@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/osdev0/freestnd-cxx-hdrs.git
while true; do \
git pull --all; \
git add ${{matrix.target_arch}}; \
git commit --allow-empty -m "Upload headers (${{matrix.target_arch}}) [ci skip]"; \
if git push origin trunk; then \
break; \
else \
git reset HEAD~1; \
fi; \
done