Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 048f19e

Browse files
committed
Build a CodeQL extractor pack
1 parent 73a0905 commit 048f19e

1 file changed

Lines changed: 59 additions & 11 deletions

File tree

.github/workflows/build.yml

Lines changed: 59 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: Rust
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
env:
1010
CARGO_TERM_COLOR: always
@@ -13,16 +13,64 @@ jobs:
1313
build:
1414
strategy:
1515
fail-fast: false
16-
matrix:
17-
os: [ubuntu-latest, osx-latest, windows-latest ]
16+
matrix:
17+
os: [ubuntu-latest, macos-latest, windows-latest]
1818

1919
runs-on: ${{ matrix.os }}
2020

2121
steps:
22-
- uses: actions/checkout@v2
23-
with:
24-
submodules: true
25-
- name: Build
26-
run: cargo build --verbose
27-
- name: Run tests
28-
run: cargo test --verbose
22+
- uses: actions/checkout@v2
23+
with:
24+
submodules: true
25+
- name: Build
26+
run: cargo build --verbose
27+
- name: Generate dbscheme
28+
if: ${{ matrix.os == 'ubuntu-latest' }}
29+
run: target/debug/generator
30+
- uses: actions/upload-artifact@v2
31+
if: ${{ matrix.os == 'ubuntu-latest' }}
32+
with:
33+
name: ruby.dbscheme
34+
path: ruby.dbscheme
35+
- uses: actions/upload-artifact@v2
36+
with:
37+
name: extractor-${{ matrix.os }}
38+
path: |
39+
target/debug/ruby-extractor
40+
target/debug/ruby-extractor.exe
41+
retention-days: 1
42+
- name: Run tests
43+
run: cargo test --verbose
44+
package:
45+
runs-on: ubuntu-latest
46+
needs: build
47+
steps:
48+
- uses: actions/checkout@v2
49+
- uses: actions/download-artifact@v2
50+
with:
51+
name: ruby.dbscheme
52+
path: codeql-ruby/ruby
53+
- uses: actions/download-artifact@v2
54+
with:
55+
name: extractor-ubuntu-latest
56+
path: linux64
57+
- uses: actions/download-artifact@v2
58+
with:
59+
name: extractor-windows-latest
60+
path: win64
61+
- uses: actions/download-artifact@v2
62+
with:
63+
name: extractor-macos-latest
64+
path: osx64
65+
- run: |
66+
mkdir -p codeql-ruby/ruby
67+
cp -r codeql-extractor.yml tools codeql-ruby/ruby/
68+
mkdir -p codeql-ruby/ruby/tools/{linux64,osx64,win64}
69+
cp linux64/ruby-extractor codeql-ruby/ruby/tools/linux64/extractor
70+
cp osx64/ruby-extractor codeql-ruby/ruby/tools/osx64/extractor
71+
cp win64/ruby-extractor.exe codeql-ruby/ruby/tools/win64/extractor.exe
72+
- uses: actions/upload-artifact@v2
73+
with:
74+
name: codeql-ruby
75+
path: codeql-ruby
76+
retention-days: 1

0 commit comments

Comments
 (0)