-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathappveyor.yml
107 lines (101 loc) · 4.53 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
image:
- Visual Studio 2019
- macos-monterey
- Ubuntu2004
- Ubuntu2204
environment:
access_token:
secure: i6EjJctBS70th59Adk4m/aVlt8mOxvlyI5GIrHY3AkdHFX2MlIK1RvdK/lC6SqDB
for:
- matrix:
only:
- image: Visual Studio 2019
install:
- set QTDIR=C:\Qt\6.5\msvc2019_64
- set PATH=%PATH%;%QTDIR%\bin
- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
build_script:
- qmake APP_VERSION=%%APPVEYOR_REPO_TAG_NAME%%
- nmake
# before_deploy can only be used on Windows, see https://github.com/appveyor/ci/issues/3597
before_deploy:
- mkdir emulator
- windeployqt release/von-neumann-emu.exe --release --dir emulator\
- copy release\von-neumann-emu.exe emulator\emulator.exe
- 7z a -r -tzip "emulator-%%APPVEYOR_REPO_TAG_NAME%%-windows-x86_64.zip" emulator\
- appveyor PushArtifact "emulator-%%APPVEYOR_REPO_TAG_NAME%%-windows-x86_64.zip"
- matrix:
only:
- image: macos-monterey
install:
- export QTDIR=$HOME/Qt/6.4/macos
- export PATH="${PATH}:${QTDIR}/bin"
build_script:
# "qmake QMAKE_APPLE_DEVICE_ARCHS=arm64 -qtdir <QtDir with ARM64>" will enable M1/M2 builds once provided by AppVeyor
- qmake APP_VERSION="${APPVEYOR_REPO_TAG_NAME}"
- make -j $(nproc)
after_build:
- sh: |
if [ "$APPVEYOR_REPO_TAG" = "true" ] ; then
macdeployqt von-neumann-emu.app -dmg
mv von-neumann-emu.dmg "emulator-${APPVEYOR_REPO_TAG_NAME}-macos-x86_64.dmg"
appveyor PushArtifact "emulator-${APPVEYOR_REPO_TAG_NAME}-macos-x86_64.dmg"
fi
- matrix:
only:
- image: Ubuntu2004
install:
- export QTDIR=$HOME/Qt/6.4/gcc_64
- export PATH="${PATH}:${QTDIR}/bin"
build_script:
- qmake APP_VERSION="${APPVEYOR_REPO_TAG_NAME}"
- make -j $(nproc)
after_build:
- sh: |
if [ "$APPVEYOR_REPO_TAG" = "true" ] ; then
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy*.AppImage
cp res/famfamfam/control_play_blue.png von-neumann-emu.png
./linuxdeploy-x86_64.AppImage -e von-neumann-emu -i von-neumann-emu.png --appdir AppDir --create-desktop-file --plugin qt --output appimage
mv von-neumann-emu-x86_64.AppImage "emulator-${APPVEYOR_REPO_TAG_NAME}-linux-x86_64.AppImage"
appveyor PushArtifact "emulator-${APPVEYOR_REPO_TAG_NAME}-linux-x86_64.AppImage"
fi
- matrix:
only:
- image: Ubuntu2204
install:
- docker pull ghcr.io/funzinator/qt6-wasm:6.6
build_script:
- docker run --rm -v "$HOME/projects/$APPVEYOR_PROJECT_NAME:/home/user/project:rw" -w /home/user/project -e APP_VERSION="${APPVEYOR_REPO_TAG_NAME}" ghcr.io/funzinator/qt6-wasm:6.6 sh -c 'qmake APP_VERSION="${APP_VERSION}" && make -j $(nproc)'
after_build:
- ps: Set-Content -Path "$HOME\.git-credentials" -Value "https://$($env:access_token):[email protected]`n" -NoNewline
- sh: |
if [ "$APPVEYOR_REPO_TAG" = "true" ] ; then
mv von-neumann-emu.html index.html
tar cvzf "emulator-${APPVEYOR_REPO_TAG_NAME}-wasm.tar.gz" index.html qtloader.js qtlogo.svg von-neumann-emu.js von-neumann-emu.wasm
appveyor PushArtifact "emulator-${APPVEYOR_REPO_TAG_NAME}-wasm.tar.gz"
git config --global credential.helper store
git config --global user.email "[email protected]"
git config --global user.name "Funzinator"
git clone --branch wasm "https://github.com/funzinator/${APPVEYOR_PROJECT_NAME}.git" $HOME/projects/wasm
cd $HOME/projects/wasm
rm *
tar xvzf "$HOME/projects/${APPVEYOR_PROJECT_NAME}/emulator-${APPVEYOR_REPO_TAG_NAME}-wasm.tar.gz"
git add .
git commit -m "$(echo ${APPVEYOR_REPO_TAG_NAME} | sed -e 's/v/Version /g')"
git push
fi
deploy:
- release: $(APPVEYOR_REPO_TAG_NAME)
description: 'von-Neumann-Emulator $(APPVEYOR_REPO_TAG_NAME)'
provider: GitHub
auth_token:
secure: PL44es3rGKnzlt+xc0ZcUSqy/81+fxqB+LAgbKUc2pULxR8cV5zKLvcvbvxGp36u
artifact: /emulator-.*\.(zip|dmg|AppImage|tar\.gz)/
draft: false
prerelease: false
tag: $(APPVEYOR_REPO_TAG_NAME)
on:
branch: master
APPVEYOR_REPO_TAG: true