From 8df9eb4885fc40dd05b93769aedd16c64b2085be Mon Sep 17 00:00:00 2001 From: Jiawen Geng Date: Thu, 6 May 2021 12:09:25 +0000 Subject: [PATCH] build: add lto build to CI --- .github/workflows/misc.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/misc.yml b/.github/workflows/misc.yml index 6167af045f0543..ef5776a8cca377 100644 --- a/.github/workflows/misc.yml +++ b/.github/workflows/misc.yml @@ -32,3 +32,22 @@ jobs: path: out/doc - name: Test run: NODE=$(command -v node) make test-doc-ci TEST_CI_ARGS="-p actions" + + build-lto: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + # not working on gcc-8 and gcc-9 see https://github.com/nodejs/node/issues/38570 + container: gcc:11 + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ env.NODE_VERSION }} + uses: actions/setup-node@v1 + with: + node-version: ${{ env.NODE_VERSION }} + - name: Environment Information + run: npx envinfo + - name: Build lto + run: | + apt update && apt install ninja-build python-is-python3 -y + ./configure --enable-lto --ninja + ninja -C out/Release