update gcc #105
This file contains hidden or 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: C/C++ CI | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| # pull_request: | |
| # branches: [ "master" ] | |
| jobs: | |
| build-gcc: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # TODO: skip if cache hit | |
| - name: install apt packages | |
| run: sudo apt update && sudo apt install g++-14 bzip2 flex build-essential | |
| - uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| - name: get gcc commit | |
| id: get-gcc-commit | |
| run: | | |
| echo "commit=$(git rev-parse HEAD:submodules/gcc)" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: cache gcc install | |
| id: cache-gcc | |
| uses: actions/cache@v4 | |
| with: | |
| path: /opt/GCC | |
| key: ${{ runner.os }}-gcc-${{ steps.get-gcc-commit.outputs.commit }} | |
| - name: install gcc | |
| run: | | |
| git submodule update --init --depth=1 -- submodules/gcc | |
| submodules/build-gcc.sh --install | |
| if: steps.cache-gcc.outputs.cache-hit != 'true' | |
| build: | |
| needs: build-gcc | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # - name: install apt packages | |
| # run: sudo apt update && sudo apt install g++-14 nlohmann-json3-dev bzip2 flex build-essential | |
| - uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| - name: fetch nlohmann json | |
| run: | | |
| git submodule update --init --depth=1 -- submodules/nlohmann-json | |
| - name: get gcc commit | |
| id: get-gcc-commit | |
| run: | | |
| echo "commit=$(git rev-parse HEAD:submodules/gcc)" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: restore gcc install | |
| uses: actions/cache/restore@v5 | |
| id: cache-gcc | |
| with: | |
| path: /opt/GCC | |
| key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} | |
| fail-on-cache-miss: true | |
| - name: activate gcc | |
| run: | | |
| echo "/opt/GCC/bin" >> $GITHUB_PATH | |
| echo "LD_RUN_PATH=/opt/GCC/lib64" >> $GITHUB_ENV | |
| - name: validate gcc | |
| run: echo | g++ -xc++ -E --verbose - | |
| - name: build | |
| run: CXXVER=26 ./build.py /build_system /linux /process /algos /meta /utility /stl | |
| build2: | |
| needs: build-gcc | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # - name: install apt packages | |
| # run: sudo apt update && sudo apt install g++-14 nlohmann-json3-dev bzip2 flex build-essential | |
| - uses: webfactory/[email protected] | |
| with: | |
| ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| - name: fetch nlohmann json | |
| run: | | |
| git submodule update --init --depth=1 -- submodules/nlohmann-json | |
| - name: get gcc commit | |
| id: get-gcc-commit | |
| run: | | |
| echo "commit=$(git rev-parse HEAD:submodules/gcc)" >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: restore gcc install | |
| uses: actions/cache/restore@v5 | |
| id: cache-gcc | |
| with: | |
| path: /opt/GCC | |
| key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} | |
| fail-on-cache-miss: true | |
| - name: activate gcc | |
| run: | | |
| echo "/opt/GCC/bin" >> $GITHUB_PATH | |
| echo "LD_RUN_PATH=/opt/GCC/lib64" >> $GITHUB_ENV | |
| - name: validate gcc | |
| run: echo | g++ -xc++ -E --verbose - | |
| - name: build2 | |
| run: ./bootstrap.sh /ivl/build_system /ivl/linux /ivl/process /ivl/algos /ivl/meta /ivl/utility /ivl/stl |