forked from SerenityOS/serenity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
89 lines (74 loc) 路 3.43 KB
/
action.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
name: 'Setup action'
description: 'Sets up the dependencies for the CI VM'
author: 'Andrew Kaster <[email protected]>'
inputs:
os:
description: 'Operating System to set up'
required: true
default: 'Linux'
arch:
description: 'Target Architecture to set up'
required: false
default: 'x86_64'
runs:
using: "composite"
steps:
- name: 'Install Dependencies'
if: ${{ inputs.os == 'Linux' }}
shell: bash
run: |
# These packages are already part of the ubuntu-22.04 image:
# cmake libgmp-dev npm shellcheck
# Packages below aren't.
set -e
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http:https://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main'
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install ccache clang-18 clang++-18 clang-format-18 lld-18 gcc-13 g++-13 libstdc++-13-dev ninja-build unzip qt6-base-dev qt6-tools-dev-tools libqt6svg6-dev qt6-multimedia-dev libgl1-mesa-dev libpulse-dev libssl-dev libegl1-mesa-dev
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-18 100
sudo update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-18 100
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 100
wget https://github.com/WebAssembly/wabt/releases/download/1.0.23/wabt-1.0.23-ubuntu.tar.gz
tar -xzf ./wabt-1.0.23-ubuntu.tar.gz
rm ./wabt-1.0.23-ubuntu.tar.gz
echo "${{ github.workspace }}/wabt-1.0.23/bin" >> $GITHUB_PATH
- name: 'Install JS dependencies'
if: ${{ inputs.os == 'Linux' || inputs.os == 'Serenity' }}
shell: bash
run: sudo npm install -g [email protected]
- name: 'Install Python dependencies'
if: ${{ inputs.os == 'Linux' || inputs.os == 'Serenity' }}
shell: bash
run: |
python3 -m pip install --upgrade pip
pip3 install flake8 requests six
- name: 'Install Dependencies'
if: ${{ inputs.os == 'Serenity' }}
shell: bash
run: |
set -e
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http:https://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main'
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install clang-format-18 ccache e2fsprogs gcc-13 g++-13 libstdc++-13-dev libmpfr-dev libmpc-dev ninja-build optipng qemu-utils qemu-system-i386 unzip generate-ninja libegl1-mesa-dev
if ${{ inputs.arch == 'aarch64' }}; then
# FIXME: Remove this when we no longer build our own Qemu binary.
sudo apt-get install libgtk-3-dev libpixman-1-dev libsdl2-dev libslirp-dev
fi
- name: Enable KVM group perms
if: ${{ inputs.os == 'Serenity' }}
shell: bash
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: 'Install Dependencies'
if: ${{ inputs.os == 'macOS' || inputs.os == 'Android' }}
shell: bash
run: |
set -e
brew update
brew install coreutils bash ninja wabt ccache unzip qt llvm@18