-
-
Notifications
You must be signed in to change notification settings - Fork 169
116 lines (114 loc) · 3.5 KB
/
java-reachables-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: Reachables tests
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
java-sample1:
strategy:
fail-fast: false
matrix:
node-version: ['23.x']
os: ['ubuntu-latest']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '23'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build
run: |
corepack enable
corepack pnpm install
mkdir -p repotests
mkdir -p bomresults
- uses: actions/checkout@v4
with:
repository: 'DependencyTrack/dependency-track'
path: 'repotests/dependency-track'
ref: '4.11.1'
- name: compile
run: |
cd repotests/dependency-track
mvn -q clean compile -DskipTests -Dmaven.test.skip=true
- name: repotests
run: |
node bin/cdxgen.js -p -t java --profile research -o repotests/dependency-track/bom.json repotests/dependency-track
ls -ltr repotests/dependency-track/
cp -rf repotests/dependency-track/*.json bomresults/
env:
CDXGEN_DEBUG_MODE: debug
- uses: actions/upload-artifact@v4
with:
name: bomresults
path: bomresults
ruby-sample1:
strategy:
fail-fast: false
matrix:
node-version: ['23.x']
os: ['ubuntu-latest']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '23'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build
run: |
corepack enable
corepack pnpm install
echo "${GITHUB_WORKSPACE}/node_modules/.bin" >> "$GITHUB_PATH"
mkdir -p repotests
mkdir -p rubyresults
- uses: actions/checkout@v4
with:
repository: 'campsite/campsite'
path: 'repotests/campsite'
ref: '10197238bbbefd9c9ac7c77467b647fd93993ba0'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
id: ruby34
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.4'
- name: bundle install
run: |
cd repotests/campsite/api
bundle install
rm -rf vendor/cache vendor/yarn
env:
BUNDLE_PATH: vendor/bundle
- name: generate sbom with reachables
run: |
echo "ATOM_RUBY_HOME: ${ATOM_RUBY_HOME}"
echo "BUNDLE_PATH: ${BUNDLE_PATH}"
atom --help
rbastgen --help
node $GITHUB_WORKSPACE/bin/cdxgen.js -p -t ruby --profile research -o bom.json .
ls -lh
cp bom.json *.slices.json $GITHUB_WORKSPACE/rubyresults
env:
CDXGEN_DEBUG_MODE: debug
ATOM_RUBY_HOME: ${{ steps.ruby34.outputs.ruby-prefix }}
CDXGEN_GEM_HOME: vendor/bundle/ruby/3.3.0
working-directory: ./repotests/campsite/api
- uses: actions/upload-artifact@v4
with:
name: rubyresults
path: rubyresults