Skip to content

gui: allow opening and importing from the same file open dialog #154

gui: allow opening and importing from the same file open dialog

gui: allow opening and importing from the same file open dialog #154

Workflow file for this run

name: Build
on:
push:
env:
QT_VERSION: '6.4.1'
jobs:
build-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: submodules-init
uses: snickerbockers/submodules-init@v4
- name: Install Qt6
uses: jurplel/install-qt-action@v3
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
working-directory: ${{github.workspace}}
run: cmake . -DCMAKE_BUILD_TYPE=Release -DQT_BASEDIR=$Qt6_DIR -B ./build
- name: Build
working-directory: ${{github.workspace}}
run: |
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/usr/local/lib"
echo $LD_LIBRARY_PATH
cmake --build ./build
- name: Package Artifacts
run: |
cd build
zip ../vtex2.linux-amd64.zip vtex2 vtfview
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: vtex2.linux-amd64
path: vtex2.linux-amd64.zip
if-no-files-found: warn
# Windows build + artifact upload
build-windows:
runs-on: windows-latest
strategy:
matrix:
build_config: ["Release"]
steps:
- uses: actions/checkout@v3
- name: submodules-init
uses: snickerbockers/submodules-init@v4
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Install Qt6
uses: jurplel/install-qt-action@v3
with:
version: ${{env.QT_VERSION}}
archives: 'qtbase qtsvg'
- name: Generate Solution
working-directory: ${{github.workspace}}
run: cmake . -G "Visual Studio 17 2022" -DQT_BASEDIR=$Qt6_DIR -B build
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /m /p:Configuration=${{matrix.build_config}} build\vtex2.sln
- name: Package Artifacts
run: |
Get-ChildItem -Path build\Release\vtex2.exe, build\Release\vtfview.exe | Compress-Archive -DestinationPath vtex2.windows-amd64.zip
- name: Upload a Build Artifact
uses: actions/[email protected]
with:
name: vtex2.windows-amd64
path: vtex2.windows-amd64.zip
if-no-files-found: warn
# Release draft + artifact upload
draft-release:
needs: [build-windows, build-linux]
runs-on: ubuntu-latest
if: github.ref_name == 'main'
steps:
# Get the artifacts from previous stages
- uses: actions/download-artifact@master
with:
name: vtex2.windows-amd64
- uses: actions/download-artifact@master
with:
name: vtex2.linux-amd64
- run: ls -R
- name: Store SHA
run: echo "GH_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
# Draft a release
- name: Draft Release
uses: actions/create-release@v1
id: create_release
with:
draft: true
prerelease: true
release_name: vtex2 - ${{github.sha}}
tag_name: ${{github.ref}}
env:
GITHUB_TOKEN: ${{github.token}}
# Upload the linux artifacts
- name: Upload Linux Artifacts
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{github.token}}
with:
upload_url: ${{steps.create_release.outputs.upload_url}}
asset_path: ./vtex2.linux-amd64.zip
asset_name: vtex2.linux-amd64.zip
asset_content_type: application/zip
# Upload the windows artifacts
- name: Upload Windows Artifacts
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{github.token}}
with:
upload_url: ${{steps.create_release.outputs.upload_url}}
asset_path: ./vtex2.windows-amd64.zip
asset_name: vtex2.windows-amd64.zip
asset_content_type: application/zip