2023-11-06 13:31:47 +00:00
|
|
|
name: Gitea Actions Demo
|
|
|
|
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
Explore-Gitea-Actions:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
|
|
|
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
|
|
|
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
2023-11-06 15:03:40 +00:00
|
|
|
- name: Install jq
|
|
|
|
uses: dcarbone/install-jq-action@v2.0.2
|
|
|
|
- name: Install gotempl
|
|
|
|
run: |
|
|
|
|
mkdir -p $HOME/bin
|
|
|
|
wget -O $HOME/bin/gotempl https://github.com/link-society/gotempl/releases/download/v0.7.0/gotempl-linux-amd64
|
|
|
|
chmod +x $HOME/bin/gotempl
|
2023-11-06 15:06:04 +00:00
|
|
|
- name: Install dependencies
|
2023-11-06 15:03:40 +00:00
|
|
|
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
|
|
|
|
run: |
|
2023-11-06 15:06:04 +00:00
|
|
|
apt-get update
|
|
|
|
apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev
|
2023-11-06 15:03:40 +00:00
|
|
|
- name: Install windows cross-compiling deps
|
2023-11-06 15:12:28 +00:00
|
|
|
run: apt install -y nsis lld llvm
|
2023-11-06 16:57:10 +00:00
|
|
|
- name: Install rust and allow it to work with the crosscompiler stuff.
|
|
|
|
# has to be done all together because of https://github.com/rust-lang/rustup/issues/1239
|
2023-11-06 15:03:40 +00:00
|
|
|
run: |
|
2023-11-06 17:03:33 +00:00
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rustup.sh
|
|
|
|
sh /tmp/rustup.sh -y
|
2023-11-06 15:03:40 +00:00
|
|
|
rustup target add x86_64-pc-windows-msvc
|
|
|
|
cargo install xwin
|
2023-11-06 16:57:59 +00:00
|
|
|
xwin --accept-license splat --output ~/.xwin --disable-symlinks
|
2023-11-06 15:03:40 +00:00
|
|
|
mkdir $HOME/.cargo -p
|
2023-11-06 15:12:28 +00:00
|
|
|
cat > $HOME/.cargo/config.toml <<EOF
|
2023-11-06 15:03:40 +00:00
|
|
|
[target.x86_64-pc-windows-msvc]
|
|
|
|
linker = "lld"
|
|
|
|
rustflags = [
|
|
|
|
"-Lnative=/home/username/.xwin/crt/lib/x86_64",
|
|
|
|
"-Lnative=/home/username/.xwin/sdk/lib/um/x86_64",
|
|
|
|
"-Lnative=/home/username/.xwin/sdk/lib/ucrt/x86_64"
|
|
|
|
]
|
|
|
|
EOF
|
2023-11-06 15:12:28 +00:00
|
|
|
- name: Check out repository code
|
|
|
|
uses: actions/checkout@v3
|
2023-11-06 13:31:47 +00:00
|
|
|
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
|
|
|
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
2023-11-06 16:57:10 +00:00
|
|
|
- name: Try building all the apps
|
|
|
|
run: bash buildall.sh
|
2023-11-06 13:31:47 +00:00
|
|
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|