refactor: use lib4bin
to bundle everything (#16)
#99
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: Sharun CI | |
# Controls when the action will run. | |
on: | |
# Build at 00:00 on every 12th day-of-month. | |
schedule: | |
- cron: "0 0 */10 * *" | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ main ] | |
paths-ignore: [ '**/README.md' ] | |
pull_request: | |
branches: [ main ] | |
paths-ignore: [ '**/README.md' ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: artixlinux/artixlinux:latest | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v4 | |
- name: Prerequisites | |
run: | | |
sed -i 's/DownloadUser/#DownloadUser/g' /etc/pacman.conf | |
pacman -Syu --noconfirm base-devel \ | |
cmake \ | |
strace \ | |
patchelf \ | |
curl \ | |
wget \ | |
git \ | |
artix-archlinux-support \ | |
llvm \ | |
mesa \ | |
xorg-server-xvfb \ | |
vulkan-radeon \ | |
vulkan-intel \ | |
vulkan-nouveau | |
pacman-key --init && pacman-key --populate archlinux | |
printf "\n[extra]\nInclude = /etc/pacman.d/mirrorlist-arch\n" | tee -a /etc/pacman.conf | |
cat /etc/pacman.conf | |
sudo sed -i 's/NoExtract/#NoExtract/g' /etc/pacman.conf | |
pacman -Syu --noconfirm zsync \ | |
dolphin-emu \ | |
pulseaudio \ | |
pulseaudio-alsa \ | |
pipewire-audio \ | |
qt6ct | |
# Runs a set of commands using the runners shell | |
- name: Build Dolphin | |
run: | | |
git clone https://github.com/dolphin-emu/dolphin.git dolphin | |
( cd dolphin && mkdir build && cd build | |
git submodule update --init --recursive | |
cmake .. -DLINUX_LOCAL_DEV=true | |
make -j $(nproc) | |
sudo make install | |
sudo cp -r ../Data/Sys /usr/local/bin | |
sudo cp -r ./Source/Core/DolphinQt /usr/local/bin | |
) | |
- name: Make AppImage | |
run: | | |
chmod +x ./dolphin-emu-appimage.sh | |
./dolphin-emu-appimage.sh | |
mkdir dist | |
echo "$PWD" | |
ls . | |
mv *.AppImage* dist/ | |
- name: Check version file | |
run: | | |
cat ~/version | |
echo "APP_VERSION=$(cat ~/version)" >> "${GITHUB_ENV}" | |
- name: Upload artifact | |
uses: actions/[email protected] | |
with: | |
name: AppImage | |
path: 'dist' | |
- name: Upload version file | |
uses: actions/[email protected] | |
with: | |
name: version | |
path: ~/version | |
release: | |
needs: [build] | |
permissions: write-all | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
name: AppImage | |
- uses: actions/[email protected] | |
with: | |
name: version | |
- name: Read version | |
run: | | |
cat version | |
export VERSION="$(<version)" | |
echo "APP_VERSION=${VERSION}" >> "${GITHUB_ENV}" | |
#Version Release | |
- name: Del Previous Release | |
run: | | |
gh release delete "${APP_VERSION}" --repo "${GITHUB_REPOSITORY}" --cleanup-tag -y | |
env: | |
GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
continue-on-error: true | |
- name: Continuous Releaser | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: "Dolphin Emulator AppImage ${{ env.APP_VERSION }}" | |
tag_name: "${{ env.APP_VERSION}}" | |
prerelease: false | |
draft: false | |
generate_release_notes: false | |
make_latest: true | |
files: | | |
*.AppImage* | |
continue-on-error: false | |
#Snapshot Release | |
- name: Get Date | |
run: | | |
SNAPSHOT_TAG="$(date --utc +'%Y%m%d-%H%M%S')" | |
echo SNAPSHOT_TAG="${SNAPSHOT_TAG}" >> "${GITHUB_ENV}" | |
continue-on-error: false | |
- name: Snapshot Releaser | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: "Snapshot ${{ env.APP_VERSION }}" | |
tag_name: "${{ env.SNAPSHOT_TAG }}" | |
prerelease: false | |
draft: false | |
generate_release_notes: false | |
make_latest: false | |
files: | | |
*.AppImage* | |
continue-on-error: false |