Skip to content
This repository was archived by the owner on Sep 19, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 21 additions & 73 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,18 @@ jobs:
- name: Fetch submodule tags
working-directory: compiler
run: git fetch --tags https://github.com/google/closure-compiler.git
- name: Get yarn cache directory path
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
- name: Yarn and maven cache
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
with:
path: |
${{ env.yarn_cache_dir }}
~/.m2/repository
key: ${{ runner.os }}-yarn-mvn-java11-${{ hashFiles('**/yarn.lock', '**/pom.xml') }}
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
- name: Install packages
run: yarn install --colors=always
run: YARN_ENABLE_COLORS=true yarn install
- name: Build jar
# unset ANDROID_HOME to prevent bazel from trying to use the Android SDK
run: unset ANDROID_HOME && ./build-scripts/build-compiler.js
- name: Tests
run: yarn test:root --color
run: YARN_ENABLE_COLORS=true yarn test:root
- name: Upload contrib folder
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
Expand Down Expand Up @@ -137,6 +133,7 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
- name: Install GraalVM
uses: graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
with:
Expand All @@ -159,26 +156,16 @@ jobs:
with:
name: Externs folder
path: packages/google-closure-compiler/externs
- name: Get yarn cache directory path
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
- name: Cache yarn
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
id: yarn-cache
with:
path: ${{ env.yarn_cache_dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: yarn install --colors=always
run: YARN_ENABLE_COLORS=true yarn install
- name: Build image
working-directory: packages/google-closure-compiler-linux
run: |
export PATH="$MUSL_HOME/bin:$PATH"
cp ../google-closure-compiler-java/compiler.jar compiler.jar
yarn run build
- name: Tests
run: yarn workspaces run test --color
run: FORCE_COLOR=1 yarn workspaces foreach -A --no-private run test
- name: Upload artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
Expand All @@ -204,6 +191,7 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
- name: Setup GraalVM
uses: graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
with:
Expand All @@ -226,25 +214,15 @@ jobs:
with:
name: Externs folder
path: packages/google-closure-compiler/externs
- name: Get yarn cache directory path
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
- name: Cache yarn
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
id: yarn-cache
with:
path: ${{ env.yarn_cache_dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: yarn install --colors=always
run: YARN_ENABLE_COLORS=true yarn install
- name: Build image
working-directory: packages/google-closure-compiler-linux-arm64
run: |
cp ../google-closure-compiler-java/compiler.jar compiler.jar
yarn run build
- name: Tests
run: yarn workspaces run test --color
run: FORCE_COLOR=1 yarn workspaces foreach -A --no-private run test
- name: Upload artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
Expand All @@ -268,6 +246,7 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
- name: Setup GraalVM
uses: graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
with:
Expand All @@ -290,25 +269,15 @@ jobs:
with:
name: Externs folder
path: packages/google-closure-compiler/externs
- name: Get yarn cache directory path
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
- name: Cache yarn
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
id: yarn-cache
with:
path: ${{ env.yarn_cache_dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: yarn install --colors=always
run: YARN_ENABLE_COLORS=true yarn install
- name: Build image
working-directory: packages/google-closure-compiler-macos
run: |
cp ../google-closure-compiler-java/compiler.jar compiler.jar
yarn run build
- name: Tests
run: yarn workspaces run test --color
run: FORCE_COLOR=1 yarn workspaces foreach -A --no-private run test
- name: Upload artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
Expand All @@ -332,6 +301,7 @@ jobs:
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 4.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: yarn
- name: Setup GraalVM
uses: graalvm/setup-graalvm@01ed653ac833fe80569f1ef9f25585ba2811baab # 1.3.3
with:
Expand All @@ -354,29 +324,16 @@ jobs:
with:
name: Externs folder
path: packages/google-closure-compiler/externs
- name: Get yarn cache directory path
# See https://stackoverflow.com/a/66737579/1211524
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $env:GITHUB_ENV
- name: Cache yarn
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
id: yarn-cache
with:
path: ${{ env.yarn_cache_dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: yarn install --colors=always
run: yarn install
- name: Build image
working-directory: packages/google-closure-compiler-windows
run: |
cp ../google-closure-compiler-java/compiler.jar compiler.jar
yarn run build
- name: Tests
shell: cmd
run: |
echo "Running Tests"
yarn workspaces run test --color
run: yarn workspaces foreach -A --no-private run test
- name: Upload artifacts
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
Expand Down Expand Up @@ -407,6 +364,7 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
cache: yarn
- name: Download compiler jar
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # 4.3.0
with:
Expand Down Expand Up @@ -448,18 +406,8 @@ jobs:
chmod 755 packages/google-closure-compiler-linux-arm64/compiler
chmod 755 packages/google-closure-compiler-macos/compiler
chmod 755 packages/google-closure-compiler-windows/compiler.exe
- name: Get yarn cache directory path
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
- name: Cache yarn
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # 4.2.3
id: yarn-cache
with:
path: ${{ env.yarn_cache_dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: yarn install --colors=always
run: YARN_ENABLE_COLORS=true yarn install
- name: Prepare for publish
run: ./build-scripts/add-os-restrictions.js
- name: Configure yarn
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: yarn install --colors=always
run: YARN_ENABLE_COLORS=true yarn install
- name: Fetch compiler submodule tags
working-directory: compiler
run: git fetch --tags https://github.com/google/closure-compiler.git
Expand Down
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,10 @@ yarn-error.log
/temp
/zlib
.npmrc
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
Loading
Loading