|
| 1 | +name: Appimage |
| 2 | +concurrency: |
| 3 | + group: build-${{ github.ref }} |
| 4 | + cancel-in-progress: true |
| 5 | + |
| 6 | +on: |
| 7 | + schedule: |
| 8 | + - cron: "0 14 * * 0" |
| 9 | + workflow_dispatch: |
| 10 | + |
| 11 | +jobs: |
| 12 | + build: |
| 13 | + runs-on: ubuntu-22.04 |
| 14 | + container: artixlinux/artixlinux:latest |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v4 |
| 17 | + |
| 18 | + - name: Install dependencies |
| 19 | + if: always() |
| 20 | + run: | |
| 21 | + sed -i 's/DownloadUser/#DownloadUser/g' /etc/pacman.conf |
| 22 | + pacman -Syu --noconfirm base-devel strace patchelf curl wget \ |
| 23 | + desktop-file-utils git artix-archlinux-support llvm mesa xorg-server-xvfb \ |
| 24 | + vulkan-radeon vulkan-intel vulkan-nouveau pulseaudio pulseaudio-alsa pipewire |
| 25 | + pacman-key --init && pacman-key --populate archlinux |
| 26 | + printf "\n[extra]\nInclude = /etc/pacman.d/mirrorlist-arch\n" | tee -a /etc/pacman.conf |
| 27 | + sudo pacman -Syu --noconfirm \ |
| 28 | + zsync \ |
| 29 | + catch2 \ |
| 30 | + enet \ |
| 31 | + gamemode \ |
| 32 | + cmake \ |
| 33 | + gcc13 \ |
| 34 | + glslang \ |
| 35 | + glu \ |
| 36 | + hidapi \ |
| 37 | + xcb-util-wm \ |
| 38 | + xcb-util-image \ |
| 39 | + xcb-util-renderutil \ |
| 40 | + libxkbcommon-x11 \ |
| 41 | + libxi \ |
| 42 | + nasm \ |
| 43 | + qt6-tools \ |
| 44 | + qt6-base \ |
| 45 | + qt6-webengine \ |
| 46 | + qt6-multimedia \ |
| 47 | + qt6-wayland \ |
| 48 | + mbedtls2 \ |
| 49 | + fmt \ |
| 50 | + nlohmann-json \ |
| 51 | + aom \ |
| 52 | + libass \ |
| 53 | + haskell-gnutls \ |
| 54 | + sdl2 \ |
| 55 | + libva \ |
| 56 | + meson \ |
| 57 | + ninja \ |
| 58 | + x264 \ |
| 59 | + x265 \ |
| 60 | + numactl \ |
| 61 | + libvpx \ |
| 62 | + libfdk-aac \ |
| 63 | + libopusenc \ |
| 64 | + ffmpeg \ |
| 65 | + svt-av1 \ |
| 66 | + dav1d \ |
| 67 | + boost \ |
| 68 | + clang \ |
| 69 | + vulkan-headers \ |
| 70 | + ffmpeg4.4 \ |
| 71 | + zip \ |
| 72 | + unzip \ |
| 73 | + boost-libs \ |
| 74 | + doxygen \ |
| 75 | + python-pip \ |
| 76 | + libzip \ |
| 77 | + mbedtls \ |
| 78 | + libzip \ |
| 79 | + qt6ct |
| 80 | +
|
| 81 | + echo "Hacking makepkg to allow building as root in the container..." |
| 82 | + sudo sed -i 's|EUID == 0|EUID == 69|g' /usr/bin/makepkg |
| 83 | + mkdir -p /usr/local/bin |
| 84 | + cp /usr/bin/makepkg /usr/local/bin |
| 85 | + |
| 86 | + echo "its -O3 the letter, not -03 the number" |
| 87 | + sudo sed -i 's|-O2|-O3|; s|MAKEFLAGS=.*|MAKEFLAGS="-j$(nproc)"|; s|#MAKEFLAGS|MAKEFLAGS|' /etc/makepkg.conf |
| 88 | + cat /etc/makepkg.conf |
| 89 | +
|
| 90 | + - name: Compile Citron |
| 91 | + run: | |
| 92 | + chmod +x ./*-appimage.sh && ./*-appimage.sh |
| 93 | + mkdir -p dist |
| 94 | + mv *.AppImage* dist/ |
| 95 | +
|
| 96 | + - name: Compile Citron Optimized |
| 97 | + run: | |
| 98 | + rm -rf ./AppDir || true |
| 99 | + sudo pacman -R --noconfirm citron || true |
| 100 | + chmod +x ./*-appimage.sh && ./*-appimage.sh v3 |
| 101 | + mkdir -p dist |
| 102 | + mv *.AppImage* dist/ |
| 103 | +
|
| 104 | + - name: Check version file |
| 105 | + run: | |
| 106 | + cat ~/version |
| 107 | + echo "APP_VERSION=$(cat ~/version)" >> "${GITHUB_ENV}" |
| 108 | + |
| 109 | + - name: Upload artifact |
| 110 | + |
| 111 | + with: |
| 112 | + name: AppImage |
| 113 | + path: 'dist' |
| 114 | + |
| 115 | + - name: Upload version file |
| 116 | + |
| 117 | + with: |
| 118 | + name: version |
| 119 | + path: ~/version |
| 120 | + |
| 121 | + release: |
| 122 | + needs: [build] |
| 123 | + permissions: write-all |
| 124 | + runs-on: ubuntu-latest |
| 125 | + |
| 126 | + steps: |
| 127 | + |
| 128 | + with: |
| 129 | + name: AppImage |
| 130 | + |
| 131 | + with: |
| 132 | + name: version |
| 133 | + |
| 134 | + - name: Read version |
| 135 | + run: | |
| 136 | + cat version |
| 137 | + export VERSION="$(<version)" |
| 138 | + echo "APP_VERSION=${VERSION}" >> "${GITHUB_ENV}" |
| 139 | + |
| 140 | + #Version Release |
| 141 | + - name: Del Previous Release |
| 142 | + run: | |
| 143 | + gh release delete "${APP_VERSION}" --repo "${GITHUB_REPOSITORY}" --cleanup-tag -y |
| 144 | + env: |
| 145 | + GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
| 146 | + continue-on-error: true |
| 147 | + - name: Continuous Releaser |
| 148 | + uses: softprops/action-gh-release@v2 |
| 149 | + with: |
| 150 | + name: "Citron AppImage ${{ env.APP_VERSION }}" |
| 151 | + tag_name: "${{ env.APP_VERSION }}" |
| 152 | + prerelease: false |
| 153 | + draft: false |
| 154 | + generate_release_notes: false |
| 155 | + make_latest: true |
| 156 | + files: | |
| 157 | + *.AppImage* |
| 158 | + continue-on-error: false |
| 159 | + |
| 160 | + #Snapshot Release |
| 161 | + - name: Get Date |
| 162 | + run: | |
| 163 | + SNAPSHOT_TAG="$(date --utc +'%Y%m%d-%H%M%S')" |
| 164 | + echo SNAPSHOT_TAG="${SNAPSHOT_TAG}" >> "${GITHUB_ENV}" |
| 165 | + continue-on-error: false |
| 166 | + - name: Snapshot Releaser |
| 167 | + uses: softprops/action-gh-release@v2 |
| 168 | + with: |
| 169 | + name: "Snapshot ${{ env.APP_VERSION }}" |
| 170 | + tag_name: "${{ env.SNAPSHOT_TAG }}" |
| 171 | + prerelease: false |
| 172 | + draft: false |
| 173 | + generate_release_notes: false |
| 174 | + make_latest: false |
| 175 | + files: | |
| 176 | + *.AppImage* |
| 177 | + continue-on-error: false |
0 commit comments