Skip to content

Commit 7dfbf54

Browse files
authored
Merge pull request #624 from apache/fix_workflows_in_main
Fix workflows in main.
2 parents a92e7be + 763c58a commit 7dfbf54

6 files changed

Lines changed: 202 additions & 163 deletions

File tree

.github/workflows/auto-jdk-matrix.yml

Lines changed: 52 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,71 @@
11
name: DataSketches-Java Auto JDK Matrix Test & Install
22

33
on:
4-
pull_request:
5-
push:
6-
branches: [ master, main ]
7-
workflow_dispatch:
4+
push:
5+
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/.*', '**/LICENSE', '**/NOTICE' ]
6+
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
7+
pull_request:
8+
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/.*', '**/LICENSE', '**/NOTICE' ]
9+
# The branches below must be a subset of the branches above
10+
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
11+
workflow_dispatch:
812

913
env:
10-
MAVEN_OPTS: -Xmx4g -Xms1g
14+
MAVEN_OPTS: -Xmx4g -Xms1g
1115

1216
jobs:
13-
build:
14-
name: Build, Test, Install
15-
runs-on: ubuntu-latest
17+
build:
18+
name: Build, Test, Install
19+
runs-on: ubuntu-latest
1620

17-
strategy:
18-
fail-fast: false
19-
matrix:
20-
jdk: [ 17 ]
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
jdk: [ 17 ]
2125

22-
env:
23-
JDK_VERSION: ${{ matrix.jdk }}
26+
env:
27+
JDK_VERSION: ${{ matrix.jdk }}
2428

25-
steps:
26-
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
27-
uses: actions/checkout@v4
28-
with:
29-
persist-credentials: false
29+
steps:
30+
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
31+
uses: actions/checkout@v4
32+
with:
33+
persist-credentials: false
3034

31-
- name: Print Current workflow
32-
run: >
33-
cat .github/workflows/auto-jdk-matrix.yml
35+
- name: Print Current workflow
36+
run: >
37+
cat .github/workflows/auto-jdk-matrix.yml
3438
35-
- name: Cache local Maven repository
36-
uses: actions/cache@v4
37-
with:
38-
path: ~/.m2/repository
39-
key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
40-
restore-keys: build-${{ runner.os }}-maven-
39+
- name: Cache local Maven repository
40+
uses: actions/cache@v4
41+
with:
42+
path: ~/.m2/repository
43+
key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
44+
restore-keys: build-${{ runner.os }}-maven-
4145

42-
- name: Install Matrix JDK
43-
uses: actions/setup-java@v4
44-
with:
45-
java-version: ${{ matrix.jdk }}
46-
distribution: 'temurin'
47-
java-package: jdk
48-
architecture: x64
46+
- name: Install Matrix JDK
47+
uses: actions/setup-java@v4
48+
with:
49+
java-version: ${{ matrix.jdk }}
50+
distribution: 'temurin'
51+
java-package: jdk
52+
architecture: x64
4953

50-
- name: Echo Java Version
51-
run: >
52-
java -version
54+
- name: Echo Java Version
55+
run: >
56+
java -version
5357
54-
- name: Test
55-
run: >
56-
mvn clean test -B
57-
-Dmaven.javadoc.skip=true
58-
-Dgpg.skip=true
58+
- name: Test
59+
run: >
60+
mvn clean test -B
61+
-Dmaven.javadoc.skip=true
62+
-Dgpg.skip=true
5963
60-
- name: Install
61-
run: >
62-
mvn clean install -B
63-
-DskipTests=true
64-
-Dgpg.skip=true
64+
- name: Install
65+
run: >
66+
mvn clean install -B
67+
-DskipTests=true
68+
-Dgpg.skip=true
6569
6670
# Architecture options: x86, x64, armv7, aarch64, ppc64le
6771
# setup-java@v4 has a "with cache" option

.github/workflows/auto-os-matrix.yml

Lines changed: 61 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,81 @@
11
name: DataSketches-Java Auto OS Matrix Test & Install
22

33
on:
4-
pull_request:
5-
push:
6-
branches: [ master, main ]
7-
workflow_dispatch:
4+
push:
5+
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/.*', '**/LICENSE', '**/NOTICE' ]
6+
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
7+
pull_request:
8+
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/.*', '**/LICENSE', '**/NOTICE' ]
9+
# The branches below must be a subset of the branches above
10+
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
11+
workflow_dispatch:
812

913
env:
10-
MAVEN_OPTS: -Xmx1g -Xms1g
14+
MAVEN_OPTS: -Xmx4g -Xms1g
1115

1216
jobs:
13-
build:
14-
name: Build, Test, Install
17+
build:
18+
name: Build, Test, Install
1519

16-
strategy:
17-
fail-fast: false
20+
strategy:
21+
fail-fast: false
1822

19-
matrix:
20-
jdk: [ 17 ]
21-
os: [ windows-latest, ubuntu-latest, macos-latest ]
22-
include:
23-
- os: windows-latest
24-
skip_javadoc: "`-Dmaven`.javadoc`.skip=true"
25-
skip_gpg: "`-Dgpg`.skip=true"
26-
- os: ubuntu-latest
27-
skip_javadoc: -Dmaven.javadoc.skip=true
28-
skip_gpg: -Dgpg.skip=true
29-
- os: macos-latest
30-
skip_javadoc: -Dmaven.javadoc.skip=true
31-
skip_gpg: -Dgpg.skip=true
23+
matrix:
24+
jdk: [ 17 ]
25+
os: [ windows-latest, ubuntu-latest, macos-latest ]
26+
include:
27+
- os: windows-latest
28+
skip_javadoc: "`-Dmaven`.javadoc`.skip=true"
29+
skip_gpg: "`-Dgpg`.skip=true"
30+
- os: ubuntu-latest
31+
skip_javadoc: -Dmaven.javadoc.skip=true
32+
skip_gpg: -Dgpg.skip=true
33+
- os: macos-latest
34+
skip_javadoc: -Dmaven.javadoc.skip=true
35+
skip_gpg: -Dgpg.skip=true
3236

33-
runs-on: ${{matrix.os}}
37+
runs-on: ${{matrix.os}}
3438

35-
env:
36-
JDK_VERSION: ${{ matrix.jdk }}
39+
env:
40+
JDK_VERSION: ${{ matrix.jdk }}
3741

38-
steps:
39-
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
40-
uses: actions/checkout@v4
41-
with:
42-
persist-credentials: false
42+
steps:
43+
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
44+
uses: actions/checkout@v4
45+
with:
46+
persist-credentials: false
4347

44-
- name: Cache local Maven repository
45-
uses: actions/cache@v4
46-
with:
47-
path: ~/.m2/repository
48-
key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
49-
restore-keys: build-${{ runner.os }}-maven-
48+
- name: Cache local Maven repository
49+
uses: actions/cache@v4
50+
with:
51+
path: ~/.m2/repository
52+
key: build-${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
53+
restore-keys: build-${{ runner.os }}-maven-
5054

51-
- name: Install Matrix JDK
52-
uses: actions/setup-java@v4
53-
with:
54-
java-version: ${{ matrix.jdk }}
55-
distribution: 'temurin'
56-
java-package: jdk
57-
architecture: x64
55+
- name: Install Matrix JDK
56+
uses: actions/setup-java@v4
57+
with:
58+
java-version: ${{ matrix.jdk }}
59+
distribution: 'temurin'
60+
java-package: jdk
61+
architecture: x64
5862

59-
- name: Echo Java Version
60-
run: >
61-
java -version
63+
- name: Echo Java Version
64+
run: >
65+
java -version
6266
63-
- name: Test
64-
run: >
65-
mvn clean test
66-
${{matrix.os.skip_javadoc}}
67-
${{matrix.os.skip_gpg}}
67+
- name: Test
68+
run: >
69+
mvn clean test
70+
${{matrix.os.skip_javadoc}}
71+
${{matrix.os.skip_gpg}}
6872
69-
- name: Install
70-
run: >
71-
mvn clean install -B
72-
${{matrix.os.skip_javadoc}}
73-
-D skipTests=true
74-
${{matrix.os.skip_gpg}}
73+
- name: Install
74+
run: >
75+
mvn clean install -B
76+
${{matrix.os.skip_javadoc}}
77+
-D skipTests=true
78+
${{matrix.os.skip_gpg}}
7579
7680
# Architecture options: x86, x64, armv7, aarch64, ppc64le
7781
# setup-java@v4 has a "with cache" option

.github/workflows/auto-check_cpp_files.yml renamed to .github/workflows/check_cpp_files.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ name: Serialization Compatibility Test
22

33
on:
44
push:
5-
branches: [ master, main ]
5+
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/.*', '**/LICENSE', '**/NOTICE' ]
6+
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
7+
pull_request:
8+
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/.*', '**/LICENSE', '**/NOTICE' ]
9+
# The branches below must be a subset of the branches above
10+
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
611
workflow_dispatch:
712

813
jobs:
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/.*', '**/LICENSE', '**/NOTICE' ]
6+
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
7+
pull_request:
8+
paths-ignore: [ '**/*.html', '**/*.md', '**/*.txt', '**/*.xml', '**/*.yaml', '**/*.yml', '**/.*', '**/LICENSE', '**/NOTICE' ]
9+
# The branches below must be a subset of the branches above
10+
branches: [ 'main', '[0-9]+.[0-9]+.[Xx]' ]
11+
workflow_dispatch:
12+
13+
jobs:
14+
analyze:
15+
name: Analyze
16+
runs-on: ubuntu-latest
17+
permissions:
18+
actions: read
19+
contents: read
20+
security-events: write
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
language: [ 'java' ]
26+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
27+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
33+
- name: Setup Java
34+
uses: actions/setup-java@v4
35+
with:
36+
distribution: 'temurin'
37+
cache: 'maven'
38+
java-version: '17'
39+
40+
- name: Initialize CodeQL
41+
uses: github/codeql-action/init@v3
42+
with:
43+
languages: ${{ matrix.language }}
44+
queries: +security-and-quality
45+
46+
# If you wish to specify custom queries, you can do so here or in a config file.
47+
# By default, queries listed here will override any specified in a config file.
48+
# Prefix the list here with "+" to use these queries and those in the config file.
49+
# Details on CodeQL's query packs refer to link below.
50+
51+
- name: Custom building using maven
52+
run: >
53+
mvn clean package -f "pom.xml" -B -V -e
54+
-Dfindbugs.skip=true
55+
-Dcheckstyle.skip=true
56+
-Dpmd.skip=true
57+
-Denforcer.skip
58+
-Dmaven.javadoc.skip
59+
-DskipTests=true
60+
-Dmaven.test.skip.exec
61+
-Dlicense.skip=true
62+
-Dweb.console.skip=true
63+
-Dgpg.skip=true
64+
65+
- name: Perform CodeQL Analysis
66+
uses: github/codeql-action/analyze@v3
67+
with:
68+
category: "/language:${{matrix.language}}"
69+
70+
71+
# CodeQL's Query Packs:
72+
# https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
73+
74+
# Command-line programs to run using the OS shell.
75+
# See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
76+
77+
# Architecture options: x86, x64, armv7, aarch64, ppc64le
78+
# Lifecycles: validate, compile, test, package, verify, install, deploy
79+
# -B batch mode, never stops for user input
80+
# -V show Version without stopping
81+
# -X debug mode
82+
# -q quiet, only show errors
83+
# -e produce execution error messages

0 commit comments

Comments
 (0)