Build and upload gccefi2linux compiler nightly build #1285
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
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
name: Build and upload gccefi2linux compiler nightly build | |
jobs: | |
build_gccefi2linux: | |
name: Build gccefi2linux compiler | |
runs-on: ubuntu-latest | |
container: ubuntu:18.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Prepare tools | |
run: | | |
apt-get update | |
apt-get -yq install build-essential\ | |
wget\ | |
git\ | |
texinfo\ | |
libz-dev\ | |
flex | |
apt-get autoclean | |
- name: Build gccefi2linux compiler on ubuntu18 | |
env: | |
UPDATE_TOKEN: ${{ secrets.SYNC_COMMIT_DATE_NSTESTER_TOKEN }} | |
USER_NAME: 'nstester' | |
BRANCH: 'master' | |
run: | | |
builds_ws=$GITHUB_WORKSPACE | |
check_rc () { | |
rc=$? | |
if [ $rc != 0 ]; then exit $rc; fi | |
} | |
test -z $NCPU && NCPU=$(nproc) | |
cd $builds_ws | |
git config --global user.name $USER_NAME | |
git config --global user.email $USER_NAME'@users.noreply.github.com' | |
git checkout $BRANCH | |
today=$(date -u +%Y-%m-%d); | |
GIT_COMMITTER_DATE=$(date -u -R -d "$today 00:00:00") git commit --amend --no-edit | |
git push -f https://$USER_NAME:[email protected]/${{ github.repository }} HEAD:$BRANCH | |
DEPLOY_WS=${builds_ws}/deploy/linux_prod | |
rm -rf objdir ${DEPLOY_WS} | |
mkdir -p objdir ${DEPLOY_WS}/linux | |
git show --name-only --oneline HEAD^2 >${DEPLOY_WS}/gcc_changes 2>&1 || true | |
./contrib/download_prerequisites | |
cd objdir | |
$PWD/../configure --prefix=${DEPLOY_WS}/linux --enable-languages=c,c++,fortran,jit,lto --disable-multilib --enable-shared --enable-host-shared --with-system-zlib --with-demangler-in-ld -enable-clocale=gnu --with-pic --enable-cloog-backend=isl --with-fmath=sse --with-cpu=corei7 --with-arch=corei7 | |
check_rc | |
make -j$NCPU | |
check_rc | |
make install | |
check_rc | |
echo "Build finished successfully" | |
cd $DEPLOY_WS && rm -f sum.txt && find . -type f | xargs md5sum --binary > ../sum_Release.txt && mv ../sum_Release.txt ./sum.txt | |
tar cfz ../../gccefi2linux.tar.xz * | |
cd ../../ | |
- name: Upload gccefi2linux build artifacts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: gccefi2linux | |
path: gccefi2linux.tar.xz |