Skip to content

Commit

Permalink
Merge pull request #305 from google/update-actions
Browse files Browse the repository at this point in the history
Update github actions versions
  • Loading branch information
concavelenz committed Apr 3, 2024
2 parents d544892 + 3589edf commit 02d895e
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 65 deletions.
113 changes: 60 additions & 53 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,22 @@ jobs:
FORCE_COLOR: '1'
steps:
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: adopt-hotspot
java-version: 17
java-version: 21
java-package: jdk
architecture: x64
- name: Setup Bazelisk
uses: bazelbuild/setup-bazelisk@v2
- uses: actions/checkout@v3
uses: bazel-contrib/setup-bazel@0.8.1
with:
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Fetch submodule tags
Expand All @@ -44,7 +51,7 @@ jobs:
- name: Get yarn cache directory path
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
- name: Yarn and maven cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
${{ env.yarn_cache_dir }}
Expand All @@ -57,12 +64,12 @@ jobs:
- name: Tests
run: node_modules/.bin/mocha --colors
- name: Upload contrib folder
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Contrib folder
path: compiler/contrib
- name: Upload compiler jar
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Compiler.jar
path: packages/google-closure-compiler-java/compiler.jar
Expand All @@ -75,47 +82,47 @@ jobs:
needs: build-compiler
runs-on: ubuntu-20.04
env:
NODE_VERSION: '14.x'
NODE_VERSION: '18.x'
FORCE_COLOR: '1'
steps:
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: adopt-hotspot
java-version: 17
java-version: 21
java-package: jdk
architecture: x64
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: graalvm/setup-graalvm@v1
with:
version: '22.3.2'
java-version: '17'
components: 'native-image'
java-version: 21
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Setup upx
run: |
UPX_VERSION=3.96
curl --fail --show-error --location --remote-name "https://github.com/upx/upx/releases/download/v$UPX_VERSION/upx-$UPX_VERSION-amd64_linux.tar.xz"
tar -xf upx-$UPX_VERSION-amd64_linux.tar.xz
mv ./upx-$UPX_VERSION-amd64_linux/upx /usr/local/bin/upx
- name: Download compiler jar
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Compiler.jar
path: packages/google-closure-compiler-java/
- name: Download contrib folder
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Contrib folder
path: packages/google-closure-compiler/contrib
- name: Get yarn cache directory path
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
- name: Cache yarn
uses: actions/cache@v3
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ env.yarn_cache_dir }}
Expand All @@ -133,7 +140,7 @@ jobs:
- name: Tests
run: yarn workspaces run test --colors
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Linux image
path: packages/google-closure-compiler-linux/compiler
Expand All @@ -144,44 +151,44 @@ jobs:
needs: build-compiler
runs-on: macos-latest
env:
NODE_VERSION: '16.x'
NODE_VERSION: '20.x'
FORCE_COLOR: '1'
steps:
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: adopt-hotspot
java-version: 17
java-version: 21
java-package: jdk
architecture: x64
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: graalvm/setup-graalvm@v1
with:
version: '22.3.2'
java-version: '17'
components: 'native-image'
java-version: 21
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
# # See https://github.com/google/closure-compiler-npm/issues/265
# - name: Install upx
# run: brew install upx
- name: Download compiler jar
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Compiler.jar
path: packages/google-closure-compiler-java/
- name: Download contrib folder
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Contrib folder
path: packages/google-closure-compiler/contrib
- name: Get yarn cache directory path
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
- name: Cache yarn
uses: actions/cache@v3
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ env.yarn_cache_dir }}
Expand All @@ -199,7 +206,7 @@ jobs:
- name: Tests
run: yarn workspaces run test --colors
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: MacOS image
path: packages/google-closure-compiler-osx/compiler
Expand All @@ -210,42 +217,42 @@ jobs:
needs: build-compiler
runs-on: windows-latest
env:
NODE_VERSION: '18.x'
NODE_VERSION: '20.x'
FORCE_COLOR: '1'
steps:
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: adopt-hotspot
java-version: 17
java-version: 21
java-package: jdk
architecture: x64
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- uses: graalvm/setup-graalvm@v1
with:
version: '22.3.2'
java-version: '17'
components: 'native-image'
java-version: 21
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Download compiler jar
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Compiler.jar
path: packages/google-closure-compiler-java/
- name: Download contrib folder
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Contrib folder
path: packages/google-closure-compiler/contrib
- 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@v3
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ env.yarn_cache_dir }}
Expand All @@ -265,7 +272,7 @@ jobs:
echo "Running Tests"
yarn workspaces run test --colors
- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Windows image
path: packages/google-closure-compiler-windows/compiler.exe
Expand All @@ -276,7 +283,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'schedule' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
env:
NODE_VERSION: '18.x'
NODE_VERSION: '20.x'
COMPILER_NIGHTLY: ${{ github.event_name == 'schedule' }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_AUTH_TOKEN }}
FORCE_COLOR: '1'
Expand All @@ -285,34 +292,34 @@ jobs:
- build-macos
- build-windows
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: https://registry.npmjs.org/
- name: Download compiler jar
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Compiler.jar
path: packages/google-closure-compiler-java/
- name: Download Linux image
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Linux image
path: packages/google-closure-compiler-linux/
- name: Download MacOS image
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: MacOS image
path: packages/google-closure-compiler-osx/
- name: Download Windows image
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Windows image
path: packages/google-closure-compiler-windows/
- name: Download contrib folder
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: Contrib folder
path: packages/google-closure-compiler/contrib
Expand All @@ -324,7 +331,7 @@ jobs:
- name: Get yarn cache directory path
run: echo "yarn_cache_dir=$(yarn cache dir)" >> $GITHUB_ENV
- name: Cache yarn
uses: actions/cache@v3
uses: actions/cache@v4
id: yarn-cache
with:
path: ${{ env.yarn_cache_dir }}
Expand All @@ -344,4 +351,4 @@ jobs:
- name: Configure yarn
run: yarn config set registry https://registry.npmjs.org/
- name: Publish packages to npm
run: yarn publish-packages
run: yarn publish-packages
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -49,7 +49,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -62,6 +62,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
21 changes: 13 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,29 @@ jobs:
contents: write
env:
FORCE_COLOR: '1'
NODE_VERSION: '18.x'
NODE_VERSION: '20.x'
steps:
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: adopt-hotspot
java-version: 17
java-version: 21
java-package: jdk
architecture: x64
- name: Setup Bazel
uses: jwlawson/actions-setup-bazel@v1
- name: Setup Bazelisk
uses: bazel-contrib/setup-bazel@0.8.1
with:
bazel-version: '4.2.2'
- uses: actions/checkout@v3
# Avoid downloading Bazel every time.
bazelisk-cache: true
# Store build cache per workflow.
disk-cache: ${{ github.workflow }}
# Share repository cache between workflows.
repository-cache: true
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set compiler submodule to release branch
Expand Down
1 change: 1 addition & 0 deletions build-scripts/graal.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const NATIVE_IMAGE_BUILD_ARGS = [
}),
'-H:+ReportExceptionStackTraces',
'--initialize-at-build-time',
'--color=always',
'-jar',
path.resolve(process.cwd(), 'compiler.jar')
];
Expand Down

0 comments on commit 02d895e

Please sign in to comment.