Skip to content

Detect more CPU features #417

Detect more CPU features

Detect more CPU features #417

Workflow file for this run

name: CI
permissions:
contents: write
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- { use_patch: true, asset_name: "gcc-13-without-int128.deb" }
- { use_path: false, asset_name: "gcc-13.deb" }
steps:
- uses: actions/checkout@v2
- name: Install mpfr
run: sudo apt-get install gcc-10 libmpfr-dev libmpc-dev
- name: Apply patch to disable 128-bit integers
if: matrix.version.use_patch
run: git apply patches/0001-Disable-128-bit-integers-for-testing-purposes.patch
- name: Build libgccjit
run: |
cd ..
ls
mkdir build install
cd build
../gcc/configure --enable-host-shared --enable-languages=c,jit,lto --disable-bootstrap --disable-multilib --prefix=$(pwd)/../install/usr --libdir=$(pwd)/../install/usr/lib --libexecdir=$(pwd)/../install/usr/lib
make -j4
make install
- name: Build Debian package
run: |
cd ..
mkdir install/DEBIAN
cat > install/DEBIAN/control << EOF
Package: gcc-13
Version: 13
Architecture: amd64
Maintainer: Antoni Boucher <[email protected]>
Description: gcc 13 for rustc_codegen_gcc CI
EOF
dpkg-deb --root-owner-group --build install
mv install.deb gcc-13.deb
- name: Compute tag name
id: tag_name
run: |
git_hash=$(git rev-parse "$GITHUB_SHA")
echo "TAG_NAME=$git_hash" >> $GITHUB_OUTPUT
- name: Create tag
if: github.ref == 'refs/heads/master'
continue-on-error: true
uses: laputansoft/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
create_annotated_tag: true
tag: master-${{ steps.tag_name.outputs.TAG_NAME }}
- name: Create release
if: github.ref == 'refs/heads/master' && !matrix.version.use_patch
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /home/runner/work/gcc/install/usr/lib/libgccjit.so.0.0.1
asset_name: libgccjit.so
tag: master-${{ steps.tag_name.outputs.TAG_NAME }}
- name: Create release
if: github.ref == 'refs/heads/master'
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: /home/runner/work/gcc/gcc-13.deb
asset_name: ${{ matrix.version.asset_name }}
tag: master-${{ steps.tag_name.outputs.TAG_NAME }}