Skip to content

Commit

Permalink
QT6, CMake, Manual Updates, Build Script Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Meowchestra committed Jan 25, 2025
1 parent 9807df6 commit fe41412
Show file tree
Hide file tree
Showing 48 changed files with 7,664 additions and 3,418 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/cmake.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build with CMake on Windows
on:
push:
branches:
- 'main'
paths:
- '**.c'
- '**.cpp'
- '**.h'
- '**.hpp'
- '**.rc'
- '**.qrc'
- '**.ts'
- 'CMakeLists.txt'
- '.github/workflows/cmake.yml'

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'

- name: Install Qt
uses: jurplel/install-qt-action@v4
with:
version: '6.8.1'
arch: 'win64_msvc2022_64'
modules: 'qtmultimedia'

- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release

- name: Build
run: cmake --build ${{github.workspace}}/build --config Release
77 changes: 0 additions & 77 deletions .github/workflows/compile.yaml

This file was deleted.

75 changes: 75 additions & 0 deletions .github/workflows/xmake-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: publish website with xmake on windows
on:
push:
tags: '*'

jobs:
build:
runs-on: windows-latest
if: always()

steps:
- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest

- name: update repo
run: |
xrepo update-repo
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/checkout@v4
with:
ref: gh-pages
path: build/website
fetch-depth: 1

- name: cache packages from xrepo
uses: actions/cache@v4
with:
path: |
${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
key: ${{ runner.os }}-xrepo-qt-${{ hashFiles('scripts/xmake/packages.lua') }}

- name: cache xmake
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/.xmake/**/cache
${{ github.workspace }}/build/.build_cache
${{ github.workspace }}/build/.deps
${{ github.workspace }}/build/.gens
${{ github.workspace }}/build/.objs
key: ${{ runner.os }}-xmake-build-${{ hashFiles('**/xmake.lua') }}

- name: Setup graphviz
run: |
choco install graphviz doxygen.install
- name: install by xmake
run: |
xmake config --yes --mode=release --generate-repository=y
xmake build --jobs=2
xmake install installer
xmake doxygen --yes
- name: Release installer
uses: softprops/action-gh-release@v1
with:
body_path: ${{ github.workspace }}/CHANGELOG.md
draft: ${{ startsWith(github.ref, 'refs/tags/nightly') }}
fail_on_unmatched_files: true
files: |
build/website/MidiEditor.exe
- name: Publish website
run: |
cd build/website
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Generate Website for ${{ github.ref }}"
git push
106 changes: 59 additions & 47 deletions .github/workflows/xmake.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,59 @@
name: build with xmake on windows
on: push

jobs:
build:
runs-on: windows-latest
if: always()
steps:
- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: v2.8.2
- name: update repo
run: |
xrepo update-repo
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: cache packages from xrepo
uses: actions/cache@v3
with:
path: |
${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
key: ${{ runner.os }}-xrepo-qt-${{ hashFiles('scripts/xmake/packages.lua') }}
- name: cache xmake
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.xmake/**/cache
${{ github.workspace }}/build/.build_cache
${{ github.workspace }}/build/.deps
${{ github.workspace }}/build/.gens
${{ github.workspace }}/build/.objs
key: ${{ runner.os }}-xmake-build-${{ hashFiles('**/xmake.lua') }}

- name: config by xmake
run: |
xmake config --yes
- name: build by xmake
run: |
xmake build --jobs=2
- name: Upload
uses: actions/upload-artifact@v3
with:
name: ProMidEdit
path: .
# name: Build with xmake on windows
# on:
# push:
# branches:
# - 'main'
# paths:
# - '**.c'
# - '**.cpp'
# - '**.h'
# - '**.hpp'
# - '**.rc'
# - '**.qrc'
# - '**.ts'
# - '**.lua'
# - '.github/workflows/xmake.yaml'

# jobs:
# build:
# runs-on: windows-latest
# if: always()

# steps:
# - uses: xmake-io/github-action-setup-xmake@v1
# with:
# xmake-version: latest

# - name: update repo
# run: |
# xrepo update-repo

# - uses: actions/checkout@v4
# with:
# fetch-depth: 1

# - name: cache packages from xrepo
# uses: actions/cache@v4
# with:
# path: |
# ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages
# key: ${{ runner.os }}-xrepo-qt-${{ hashFiles('scripts/xmake/packages.lua') }}

# - name: cache xmake
# uses: actions/cache@v4
# with:
# path: |
# ${{ github.workspace }}/.xmake/**/cache
# ${{ github.workspace }}/build/.build_cache
# ${{ github.workspace }}/build/.deps
# ${{ github.workspace }}/build/.gens
# ${{ github.workspace }}/build/.objs
# key: ${{ runner.os }}-xmake-build-${{ hashFiles('**/xmake.lua') }}

# - name: config by xmake
# run: |
# xmake config --yes --verbose --diagnosis

# - name: build by xmake
# run: |
# xmake build --verbose --diagnosis --jobs=2
Loading

0 comments on commit fe41412

Please sign in to comment.