-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (113 loc) · 4.2 KB
/
artifact.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# This is a basic workflow to help you get started with Actions
name: Create Artifact
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: ["main"]
# 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:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- uses: actions/checkout@v3
with:
submodules: recursive
# Give the runner some swap space in an attempt to stop gkrust from crashing the build
- name: Set Swap Space
uses: pierotofy/[email protected]
with:
swap-size-gb: 6
- name: Setup git
run: |
git config --global user.email "[email protected]"
git config --global user.name "TrickyPR"
- name: Install system dependencies
run: |
sudo apt-get update --fix-missing
sudo apt-get update
sudo apt-get install dos2unix yasm nasm build-essential libgtk2.0-dev libpython3-dev m4 uuid libasound2-dev libcurl4-openssl-dev libdbus-1-dev libdrm-dev libdbus-glib-1-dev libdbus-glib-1-dev libgtk-3-dev libpulse-dev libx11-xcb-dev libxt-dev xvfb lld llvm
pip install pycairo testresources
- name: Free up space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Install sccache
env:
LINK: https://github.com/mozilla/sccache/releases/download
SCCACHE_VERSION: 0.2.13
run: |
SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
mkdir -p $HOME/.local/bin
curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Save sccache
uses: actions/cache@v3
continue-on-error: false
with:
path: /home/runner/.cache/sccache
key: ${{ runner.os }}-sccache
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Download firefox source and dependencies
run: pnpm gluon download
- name: Import
run: pnpm gluon import
- name: Bootstrap
run: |
cd engine
./mach --no-interactive bootstrap --application-choice browser
cd ..
- name: Build
run: pnpm gluon build
- name: Package
# .mar files are not properly generated, but it should be fine
continue-on-error: true
run: pnpm gluon package
- name: Rename artifacts
run: |
mv dist/experiment-runtime-*.tar.bz2 "runtime.linux.tar.bz2"
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: runtime.linux.tar.bz2
path: ./runtime.linux.tar.bz2
- name: Make artifact available
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Artifact Build"
files: |
runtime.linux.tar.bz2