Skip to content

build-daily

build-daily #74

Workflow file for this run

name: build-daily
on:
schedule:
- cron: '0 0 * * *'
# on:
# push:
# branches:
# - master
env:
GH_TOKEN: ${{ github.token }}
jobs:
update-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update continuous tag
run: |
git config --global user.email "[email protected]"
git config --global user.name "x-tools-author"
# git tag -fa continuous -m "chore: update to latest commit"
# git push origin :refs/tags/continuous
# git push origin continuous -f
git tag -d continuous || true
git push origin :refs/tags/continuous
git tag continuous
git push origin continuous -f
update-release:
runs-on: ubuntu-latest
needs: update-tag
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Delete Release
run: |
gh release delete continuous -y || true
- name: Create Release
run: |
gh release create continuous --title "Continuous Build" --notes "Daily build of wxTools..."
release-for-windows:
runs-on: windows-2022
needs: update-release
strategy:
matrix:
arch: [x86, x64]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build for Windows
shell: cmd
run: |
git fetch --tags
mkdir build
cd build
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.arch }}
cmake -DWXT_MAKE_ZIP:BOOL=ON -DCMAKE_BUILD_TYPE=Release -DWXT_GENERATE_MSIX:BOOL=OFF -G "Ninja" ../
cmake --build . --target wxTools
dir && dir .\assets && dir .\assets\wxTools
- name: Upload Release Asset for Windows
shell: cmd
run: |
for %%f in (build\assets\*.zip) do gh release upload continuous "%%f"
release-for-linux:
runs-on: ${{ matrix.os }}
needs: update-release
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
steps:
- name: checkout
uses: actions/checkout@v4
- name: install-dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build automake libtool libgtk-3-dev pkg-config software-properties-common coreutils make pkg-config xvfb
- name: build for linux
run: |
git fetch --tags
cmake --version
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DWXT_GENERATE_MSIX:BOOL=OFF -G "Ninja" ../
cmake --build . --target all
cmake --build . --target wxTools-deb
- name: Upload Release Asset for Ubuntu
run: |
ls -l
cd build/deb/wxTools
ls -l
for file in *.deb; do
new_name=$(echo $file | sed "s/\(.*\)-\([0-9.]*\)-\(.*\)/\1-${{ matrix.os }}-v\2-\3/")
mv "$file" "$new_name"
done
ls -l
find . -name "*.deb" -exec gh release upload continuous {} \;
- name: Make app image for ubuntu-20.04
if: matrix.os == 'ubuntu-20.04'
run: |
cd build
cmake --build . --target wxTools-appimage
find appimage -name "*.AppImage" -exec gh release upload continuous {} \;