Got go-to definition request/response working #30
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
name: Make CI/CD | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
workflow_dispatch: | |
inputs: | |
releaseName: | |
description: The GitHub release name | |
default: Nightly | |
required: true | |
type: string | |
releaseTagName: | |
description: The GitHub tag name to be created/updated | |
default: "nightly" | |
required: true | |
type: string | |
jobs: | |
build: | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
defaults: | |
run: | |
working-directory: ${{github.workspace}} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Configure to use MinGW-w64 (Windows) | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
run: | | |
export CC=x86_64-w64-mingw32-gcc | |
export CXX=x86_64-w64-mingw32-g++ | |
- name: Download Adept Latest Standalone (Windows) | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
run: | | |
curl -o Windows-x86_64-Standalone-Adept-nightly.zip -L https://github.com/AdeptLanguage/Adept/releases/download/Nightly/Windows-x86_64-Standalone-Adept-nightly.zip | |
7z x Windows-x86_64-Standalone-Adept-nightly.zip | |
echo "${{github.workspace}}\adept-nightly-standalone" >> $GITHUB_PATH | |
- name: Download Adept Latest Standalone (macOS) | |
if: matrix.os == 'macos-latest' | |
run: | | |
curl -o MacOS-arm64-Standalone-Adept-nightly.zip -L https://github.com/AdeptLanguage/Adept/releases/download/Nightly/MacOS-arm64-Standalone-Adept-nightly.zip | |
unzip MacOS-arm64-Standalone-Adept-nightly.zip | |
echo "${{github.workspace}}/adept-nightly-standalone" >> $GITHUB_PATH | |
- name: Download Adept Latest Standalone (Ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
curl -o Ubuntu-x86_64-Standalone-Adept-nightly.zip -L https://github.com/AdeptLanguage/Adept/releases/download/Nightly/Ubuntu-x86_64-Standalone-Adept-nightly.zip | |
unzip Ubuntu-x86_64-Standalone-Adept-nightly.zip | |
echo "${{github.workspace}}/adept-nightly-standalone" >> $GITHUB_PATH | |
- name: make (Windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
mingw32-make SHELL=cmd | |
mv adeptls.exe adeptls-windows.exe | |
- name: make (macOS) | |
if: matrix.os == 'macos-latest' | |
run: | | |
make | |
mv adeptls adeptls-macos | |
- name: make (Ubuntu) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get install -y llvm-15 | |
make | |
mv adeptls adeptls-ubuntu | |
- name: Upload Build Artifact (Windows) | |
uses: actions/upload-artifact@v3 | |
if: ${{ matrix.os == 'windows-latest' }} | |
with: | |
name: adeptls-windows | |
path: adeptls-windows.exe | |
- name: Upload Build Artifact (macOS) | |
uses: actions/upload-artifact@v3 | |
if: ${{ matrix.os == 'macos-latest' }} | |
with: | |
name: adeptls-macos | |
path: adeptls-macos | |
- name: Upload Build Artifact (Ubuntu) | |
uses: actions/upload-artifact@v3 | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
with: | |
name: adeptls-ubuntu | |
path: adeptls-ubuntu | |
deploy: | |
name: Deploy | |
needs: [build] | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' }} | |
steps: | |
- name: Get workflow dispatch inputs (workflow dispatch) | |
if: github.event_name == 'workflow_dispatch' | |
shell: bash | |
run: | | |
echo 'releaseName=${{github.event.inputs.releaseName}}' >> $GITHUB_ENV | |
echo 'releaseTagName=v${{github.event.inputs.releaseTagName}}' >> $GITHUB_ENV | |
- name: Get default inputs (push / pr) | |
if: github.event_name != 'workflow_dispatch' | |
shell: bash | |
run: | | |
echo 'releaseName=Nightly' >> $GITHUB_ENV | |
echo 'releaseTagName=nightly' >> $GITHUB_ENV | |
- name: Download Build Artifact (windows-latest) | |
uses: actions/download-artifact@v3 | |
with: | |
name: adeptls-windows | |
- name: Download Build Artifact (macos-latest) | |
uses: actions/download-artifact@v3 | |
with: | |
name: adeptls-macos | |
- name: Download Build Artifact (ubuntu-latest) | |
uses: actions/download-artifact@v3 | |
with: | |
name: adeptls-ubuntu | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date '+%B %d %Y at %l:%M %p %Z')" | |
- name: Release | |
uses: IsaacShelton/[email protected] | |
with: | |
token: ${{secrets.GITHUB_TOKEN}} | |
release: ${{env.releaseName}} | |
body: ${{ format('Last built on {0} - {1}', steps.date.outputs.date, github.sha) }} | |
tag: ${{env.releaseTagName}} | |
replace: true | |
files: > | |
adeptls-windows.exe | |
adeptls-macos | |
adeptls-ubuntu | |