feat: Add clangd configuration #181
Workflow file for this run
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: Build | |
on: | |
push: | |
env: | |
QT_VERSION: '6.4.1' | |
jobs: | |
build-linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Qt6 | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: ${{env.QT_VERSION}} | |
archives: 'qtbase qtsvg' | |
- name: Hack together libicu | |
run: | | |
wget https://github.com/unicode-org/icu/releases/download/release-56-1/icu4c-56_1-RHEL6-x64.tgz | |
tar -xvf icu4c-56_1-RHEL6-x64.tgz | |
- name: Generate | |
run: cmake . -DCMAKE_BUILD_TYPE=Release -DQT_BASEDIR=$QT_ROOT_DIR -B ./build | |
- name: Build | |
run: | | |
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/usr/local/lib" | |
echo $LD_LIBRARY_PATH | |
cmake --build ./build | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vtex2.linux-amd64 | |
path: | | |
build/vtex2 | |
build/vtfview | |
if-no-files-found: warn | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v1 | |
- name: Install Qt6 | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: ${{env.QT_VERSION}} | |
archives: 'qtbase qtsvg' | |
- name: Generate Solution | |
run: cmake . -G "Visual Studio 17 2022" -DQT_BASEDIR=$QT_ROOT_DIR -B build | |
- name: Build | |
run: msbuild /m /p:Configuration=Release build\vtex2.sln | |
- name: Upload a Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: vtex2.windows-amd64 | |
path: | | |
build/Release/vtex2.exe | |
build/Release/vtfview.exe | |
if-no-files-found: warn | |
draft-release: | |
needs: | |
- build-windows | |
- build-linux | |
runs-on: ubuntu-latest | |
if: contains(github.ref, 'refs/tags/') | |
steps: | |
- name: Download Artifacts | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const artifacts = (await github.rest.actions.listWorkflowRunArtifacts({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
run_id: ${{github.run_id}}, | |
})).data.artifacts; | |
console.log(`Found ${artifacts.length} artifacts.`); | |
for (const artifact of artifacts) { | |
console.log(`Downloading "${artifact.name}.zip"...`); | |
let download = await github.rest.actions.downloadArtifact({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
artifact_id: artifact.id, | |
archive_format: 'zip', | |
}); | |
let fs = require('fs'); | |
fs.writeFileSync(`${{github.workspace}}/${artifact.name}.zip`, Buffer.from(download.data)); | |
} | |
console.log("Artifact download complete!"); | |
- run: ls -R | |
- name: Draft Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: vtex2 - ${{github.sha}} | |
files: | | |
vtex2.linux-amd64.zip | |
vtex2.windows-amd64.zip | |
draft: true | |
prerelease: true |