10
10
11
11
jobs :
12
12
build-linux :
13
- runs-on : ubuntu-latest
13
+ runs-on : ubuntu-22.04
14
14
steps :
15
15
- uses : actions/checkout@v4
16
- - uses : nixbuild/nix-quick-install-action@v28
17
16
18
- - name : Restore and cache Nix store
19
- uses : nix-community/cache-nix-action@v5
20
- with :
21
- paths : |
22
- ~/.cargo
23
- target/release/
24
- primary-key : nix-${{ runner.os }}-${{ hashFiles('**/*.nix', 'Cargo.lock', 'Cargo.toml') }}
25
- restore-prefixes-first-match : nix-${{ runner.os }}-
26
- gc-max-store-size-linux : 1073741824
27
-
28
- - name : Add Nix channel
17
+ - name : Run sccache-cache
18
+ uses :
mozilla-actions/[email protected]
19
+
20
+ # https://github.com/servo/servo/blob/a0730d7154e183a9b2d9a9282061e6c67d87a263/.github/workflows/linux.yml#L141
21
+ - name : Set LIBCLANG_PATH # This is needed for bindgen in mozangle.
22
+ run : echo "LIBCLANG_PATH=/usr/lib/llvm-14/lib" >> $GITHUB_ENV
23
+
24
+ - name : Install dependencies
29
25
run : |
30
- nix-channel --add https://nixos.org/channels/nixos-24.05 nixpkgs
31
- nix-channel --update nixpkgs
26
+ sudo apt-get update
27
+ sudo apt install build-essential python3-pip ccache clang cmake curl \
28
+ g++ git gperf libdbus-1-dev libfreetype6-dev libgl1-mesa-dri \
29
+ libgles2-mesa-dev libglib2.0-dev libgstreamer-plugins-base1.0-dev \
30
+ gstreamer1.0-plugins-good libgstreamer-plugins-good1.0-dev \
31
+ gstreamer1.0-plugins-bad libgstreamer-plugins-bad1.0-dev \
32
+ gstreamer1.0-plugins-ugly gstreamer1.0-plugins-base \
33
+ libgstreamer-plugins-base1.0-dev gstreamer1.0-libav \
34
+ libgstrtspserver-1.0-dev gstreamer1.0-tools libges-1.0-dev \
35
+ libharfbuzz-dev liblzma-dev libunwind-dev libvulkan1 \
36
+ libx11-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev \
37
+ libxmu-dev libxmu6 libegl1-mesa-dev llvm-dev m4 xorg-dev sway \
38
+ python3-mako
32
39
33
40
- name : Build
34
- run : nix-shell shell.nix --run 'cargo build --release'
41
+ env :
42
+ SCCACHE_GHA_ENABLED : true
43
+ RUSTC_WRAPPER : ' sccache'
44
+ run : cargo build --features embed-useragent-stylesheets --release
35
45
36
46
- name : Make archive
37
- run : nix-shell shell.nix --run ' cd ./target/release && tar -czvf verso-x86_64-unknown-linux-gnu.tar.gz versoview'
47
+ run : cd ./target/release && tar -czvf verso-x86_64-unknown-linux-gnu.tar.gz versoview
38
48
39
49
- name : Upload artifact
40
50
uses : actions/upload-artifact@v4
67
77
env :
68
78
SCCACHE_GHA_ENABLED : true
69
79
RUSTC_WRAPPER : " sccache"
70
- run : cargo build --release
80
+ run : cargo build --features embed-useragent-stylesheets -- release
71
81
72
82
- name : Make archive
73
83
working-directory : ./target/release
80
90
path : ./target/release/verso-x86_64-pc-windows-msvc.tar.gz
81
91
82
92
build-mac :
93
+ strategy :
94
+ matrix :
95
+ include :
96
+ - target : aarch64-apple-darwin
97
+ - target : x86_64-apple-darwin
83
98
runs-on : macos-latest
84
99
steps :
85
100
- uses : actions/checkout@v4
@@ -102,25 +117,31 @@ jobs:
102
117
curl https://gstreamer.freedesktop.org/data/pkg/osx/1.24.6/gstreamer-1.0-devel-1.24.6-universal.pkg -o develop.pkg
103
118
sudo installer -pkg develop.pkg -target /
104
119
120
+ - name : Add rust target
121
+ run : rustup target add ${{ matrix.target }}
122
+
105
123
- name : Build
106
124
env :
107
125
SCCACHE_GHA_ENABLED : true
108
126
RUSTC_WRAPPER : " sccache"
109
- run : cargo build --release
127
+ run : cargo build --target ${{ matrix.target }} --features embed-useragent-stylesheets -- release
110
128
111
129
- name : Make archive
112
- working-directory : ./target/release
113
- run : tar -czvf verso-aarch64-apple-darwin .tar.gz versoview
130
+ working-directory : ./target/${{ matrix.target }}/ release
131
+ run : tar -czvf verso-${{ matrix.target }} .tar.gz versoview
114
132
115
133
- name : Upload artifact
116
134
uses : actions/upload-artifact@v4
117
135
with :
118
- name : verso-aarch64-apple-darwin
119
- path : ./target/release/verso-aarch64-apple-darwin .tar.gz
136
+ name : verso-${{ matrix.target }}
137
+ path : ./target/${{ matrix.target }}/ release/verso-${{ matrix.target }} .tar.gz
120
138
121
139
publish-release :
122
140
runs-on : ubuntu-latest
123
- needs : [build-linux, build-windows, build-mac]
141
+ needs :
142
+ - build-linux
143
+ - build-windows
144
+ - build-mac
124
145
steps :
125
146
- uses : actions/checkout@v4
126
147
- uses : actions/download-artifact@v4
0 commit comments