Skip to content

Commit

Permalink
Implement VISA and Platform Specific Packages (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
esarver authored Aug 27, 2024
1 parent 45ff9ac commit 350bf28
Show file tree
Hide file tree
Showing 17 changed files with 1,342 additions and 836 deletions.
110 changes: 80 additions & 30 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Tool Versions
run: npx prettier --version
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: run prettier
run: npx prettier --list-different

Expand All @@ -42,7 +42,7 @@ jobs:
- name: Tool Versions
run: npx eslint --version
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc
Expand All @@ -60,15 +60,15 @@ jobs:
password: ${{secrets.GITHUB_TOKEN}}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Tools
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc
npm ci --devDependencies
- name: Generate NPM BOM
run: npx @cyclonedx/cyclonedx-npm --output-format JSON --package-lock-only --output-reproducible --output-file npm.cdx.json
- name: Upload Results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: software-bom
path: |
Expand All @@ -87,7 +87,7 @@ jobs:
- name: Tool Versions
run: npx prettier --version
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc
Expand All @@ -98,40 +98,85 @@ jobs:
run: npx nyc report --reporter=cobertura --reporter=text

compile:
name: compile
runs-on: ubuntu-latest
container:
image: ghcr.io/tektronix/tsp-toolkit-build:latest
credentials:
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
name: Build and Package
strategy:
matrix:
include:
- runner: ubuntu-latest
triple: x86_64-unknown-linux-gnu
vscode-platform: linux-x64
os: linux
arch: x64
- runner: windows-latest
triple: x86_64-pc-windows-msvc
vscode-platform: win32-x64
os: win32
arch: x64
# - runner: macos-latest
# triple: x86_64-apple-darwin
# vscode-platform: darwin-arm64
runs-on: ${{matrix.runner}}
steps:
- name: Update ClamAV
run: freshclam
- name: Tool Versions
run: |
npm --version
clamscan -V
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install dependencies
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc
npm install
- name: Build
run: npm run compile
- name: npm Package
run: |
npx vsce package
- name: Run ClamAV
run: clamscan -v *.vsix
npx vsce package --target ${{matrix.vscode-platform}}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: package
name: package-${{matrix.vscode-platform}}
path: "*.vsix"

scan:
name: AV Scan
runs-on: ubuntu-latest
strategy:
matrix:
include:
- runner: ubuntu-latest
triple: x86_64-unknown-linux-gnu
vscode-platform: linux-x64
os: linux
arch: x64
- runner: windows-latest
triple: x86_64-pc-windows-msvc
vscode-platform: win32-x64
os: win32
arch: x64
# - runner: macos-latest
# triple: x86_64-apple-darwin
# vscode-platform: darwin-arm64
needs:
- compile
container:
image: ghcr.io/tektronix/tsp-toolkit-build:latest
credentials:
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
steps:
- name: Get Artifacts
uses: actions/download-artifact@v4
with:
name: package-${{matrix.vscode-platform}}
path: extension
- name: Update ClamAV
run: freshclam
- name: Tool Versions
run: |
clamscan -V
- name: Run ClamAV
run: clamscan -v extension/*.vsix

publish:
name: Publish
runs-on: ubuntu-latest
Expand All @@ -149,20 +194,24 @@ jobs:
if: ${{ (endsWith(github.base_ref, 'main') && (contains(github.head_ref, 'release/')) && github.event.pull_request.merged ) }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Get Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: package
pattern: package-*
merge-multiple: true
path: extension
- name: Publish to VSCode Marketplace
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc
# install vsce
npm install --devDependencies
npx vsce publish --packagePath extension/*.vsix
for f in extension/*.vsix; do
npx vsce publish --packagePath "$f"
done
env:
VSCE_PAT: ${{secrets.VSCE_PAT}}

Expand All @@ -182,7 +231,7 @@ jobs:
if: ${{ (endsWith(github.base_ref, 'main') && (contains(github.head_ref, 'release/')) || github.event.pull_request.merged ) }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
Expand Down Expand Up @@ -224,12 +273,13 @@ jobs:
- run: 'git tag --list ${V}*'
- name: Get Artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: package
pattern: package-*
merge-multiple: true
path: extension
- name: Get SBOM
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: software-bom
path: sbom
Expand Down
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"semi": false,
"singleQuote": false
"singleQuote": false,
"trailingComma": "all"
}
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how
## [0.17.2]

### Fixed

- Many notification at TSP Toolkit Activation (TSP-779)
- Make *.tsp=lua file association a User-level setting instead of a workspace setting (TSP-624)

### Added
-Add a + button to the Instruments pane title bar(TSP-792)

- Added VISA support for connecting to an instrument
- Added platform-specific extension versions for Windows x86_64 and Linux x86_64 systems
- Add a + button to the Instruments pane title bar(TSP-792)

## [0.17.0]

Expand Down
Loading

0 comments on commit 350bf28

Please sign in to comment.