-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
16ae135
commit 080e397
Showing
5 changed files
with
112 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Build | ||
description: Set up the repository, install the dependencies required to build the extension, and build the extension. | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Prepare LF build environment | ||
uses: ./lingua-franca/.github/actions/prepare-build-env | ||
- name: Install VS Code | ||
uses: ./.github/actions/install-code | ||
- name: Build the VS Code extension | ||
# TODO: Cache the JARs and node_modules, hashing by LF ref and package.json. | ||
run: npm install | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,57 @@ | ||
name: Install VS Code | ||
description: Set up VS Code (Linux-only) | ||
description: Set up VS Code | ||
author: Marten Lohstroh <marten@berkeley.edu> | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install VS Code | ||
- name: Install VS Code (Linux) | ||
if: ${{ runner.os == 'Linux' }} | ||
run: | | ||
sudo apt-get install wget gpg | ||
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg | ||
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/ | ||
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list' | ||
rm -f packages.microsoft.gpg | ||
sudo apt install apt-transport-https | ||
sudo apt update | ||
sudo apt install software-properties-common apt-transport-https wget | ||
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add - | ||
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | ||
sudo apt install code | ||
shell: bash | ||
shell: bash | ||
- name: Install VS Code (MacOS) | ||
if: ${{ runner.os == 'macOS' }} | ||
run: brew install --cask visual-studio-code | ||
shell: bash | ||
- name: Install VS Code (Windows) | ||
if: ${{ runner.os == 'Windows' }} | ||
run: | | ||
choco install vscode | ||
refreshenv | ||
echo "Appending to PATH..." | ||
Add-Content "GITHUB_PATH" "C:\Program Files\Microsoft VS Code\" | ||
Add-Content "Path" "C:\Program Files\Microsoft VS Code\" | ||
[Environment]::SetEnvironmentVariable( | ||
"Path", | ||
[Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::Machine) + ";C:\Program Files\Microsoft VS Code\", | ||
[EnvironmentVariableTarget]::Machine) | ||
[Environment]::SetEnvironmentVariable( | ||
"GITHUB_PATH", | ||
[Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::Machine) + ";C:\Program Files\Microsoft VS Code\", | ||
[EnvironmentVariableTarget]::Machine) | ||
Add-Content "GITHUB_PATH" "C:\ProgramData\chocolatey\lib\vscode" | ||
Add-Content "Path" "C:\ProgramData\chocolatey\lib" | ||
[Environment]::SetEnvironmentVariable( | ||
"Path", | ||
[Environment]::GetEnvironmentVariable("Path", [EnvironmentVariableTarget]::Machine) + ";C:\ProgramData\chocolatey\lib\vscode", | ||
[EnvironmentVariableTarget]::Machine) | ||
echo "PATH is now:" | ||
echo $env:GITHUB_PATH | ||
code | ||
vscode | ||
visualstudiocode | ||
C:\ProgramData\chocolatey\lib\vscode | ||
"C:\Program Files\Microsoft VS Code\code.exe" | ||
gcm code | ||
where code | ||
dir "C:\Program Files\Microsoft VS Code\" | ||
dir "C:\ProgramData\chocolatey\lib\vscode" | ||
shell: PowerShell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Uninstall dependencies | ||
description: Uninstall dependencies whose presence the VS Code extension may check for. | ||
|
||
runs: | ||
steps: | ||
- name: Uninstall packages | ||
uses: ./lingua-franca/.github/actions/uninstall-dependencies | ||
with: | ||
platform: ${{ matrix.platform }} | ||
- name: Uninstall packages Ubuntu | ||
run: | | ||
sudo apt-get remove gcc | ||
sudo apt-get remove g++ | ||
rm -rf ${JAVA_HOME} | ||
if: ${{ platform == 'Linux' }} | ||
- name: Uninstall packages MacOS | ||
run: | | ||
brew uninstall --ignore-dependencies g++ | ||
brew uninstall --ignore-dependencies clang-* | ||
rm -rf ${JAVA_HOME} | ||
if: ${{ runner.os == 'macOS' }} | ||
- name: Uninstall packages Windows | ||
run: | | ||
del "C:\ProgramData\Chocolatey\bin\g++.exe" | ||
del "C:\Strawberry\c\bin\g++.exe" | ||
del "C:\Program Files\LLVM\bin\clang++.exe" | ||
del /s ${JAVA_HOME} | ||
if: ${{ runner.os == 'Windows' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule lingua-franca
updated
675 files