Skip to content

Fix reference to master branch in ci workflow #6

Fix reference to master branch in ci workflow

Fix reference to master branch in ci workflow #6

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]
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
mv toolchain/lib/gcc/${{matrix.target_arch}}-elf/*/include/* ${{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
( cd ${{matrix.target_arch}} && patch -p0 <../clang-compat.patch )
- 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/libstdcxx-headers.git
while true; do \
git pull --all; \
git add ${{matrix.target_arch}}; \
git commit -m "Upload headers (${{matrix.target_arch}}) [ci skip]"; \
if git push origin trunk; then \
break; \
else \
git reset HEAD~1; \
fi; \
done