forked from BrowserWorks/Waterfox
-
Notifications
You must be signed in to change notification settings - Fork 0
169 lines (166 loc) · 6.03 KB
/
classic.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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: Build Classic for Testing
on:
pull_request:
branches:
- classic
workflow_dispatch: null
env:
ENABLE_ARTIFACTS_MODE: "true"
SHELL: "/bin/bash"
jobs:
build-linux:
runs-on: ubuntu-18.04
container:
image: ghcr.io/waterfoxco/waterfox_docker_img:latest
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Cache for Linux
uses: actions/cache@v2
with:
path: |
~/.ccache
key: ${{ runner.os }}-${{ hashFiles('**/browser/config/version_display.txt') }}
- name: Build
run: |
./mach build
- name: Package
run: |
./mach package
mkdir ./dist/
mv ./objdir-*/dist/waterfox*.tar.bz2 ./dist/
if: env.ENABLE_ARTIFACTS_MODE == 'true'
- name: Upload Linux artifact
uses: actions/upload-artifact@v2
with:
name: Artifact_Classic_Linux_${{ github.run_id }}
path: ./dist/waterfox*.tar.bz2
if: env.ENABLE_ARTIFACTS_MODE == 'true'
build-mac:
runs-on: macos-10.15
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Set up Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: "11.2.1"
- name: Install depends
run: |
brew update
brew install [email protected] ccache make nasm yasm
- name: Get SDK
run: |
wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX10.12.sdk.tar.xz
tar -xvf MacOSX10.12.sdk.tar.xz -C ../
- name: Cache for macOS
uses: actions/cache@v2
with:
path: |
~/Library/Caches/ccache
key: ${{ runner.os }}-${{ hashFiles('**/browser/config/version_display.txt') }}
- name: Build
run: |
./mach build
- name: Package
run: |
./mach package
mkdir ./dist/
mv ./objdir-*/dist/waterfox*.dmg ./dist/
if: env.ENABLE_ARTIFACTS_MODE == 'true'
- name: Upload macOS artifact
uses: actions/upload-artifact@v2
with:
name: Artifact_Classic_macOS_${{ github.run_id }}
path: ./dist/waterfox*.dmg
if: env.ENABLE_ARTIFACTS_MODE == 'true'
build-windows:
runs-on: windows-2016
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Set build directory
run: |
$pattern = '[\\]'
$BUILD_DIR = $env:GITHUB_WORKSPACE -replace $pattern, '/'
echo "G_WORKSPACE=${BUILD_DIR}" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Install depends
run: |
iwr -useb get.scoop.sh | iex
scoop install sccache llvm nasm --global
mkdir -p ~\\scoop\\buckets\\my-bucket
Copy-Item -Path $env:GITHUB_WORKSPACE\\build\\github-actions\\mozilla-build.json -Destination ~\scoop\buckets\my-bucket
scoop install my-bucket/mozilla-build --global
- name: Set system PATH variable
shell: bash
run: sed -i 's/SET PATH=.*/&;C:\\Rust\\.cargo\\bin;C:\\ProgramData\\scoop\\shims/g' /c/ProgramData/scoop/apps/mozilla-build/current/start-shell.bat
- name: Cache for Windows
uses: actions/cache@v2
with:
path: |
~/AppData/Local/Mozilla/sccache/cache
key: ${{ runner.os }}-${{ hashFiles('**/browser/config/version_display.txt') }}
- name: Build
run: C:\\ProgramData\\scoop\\apps\\mozilla-build\\current\\start-shell.bat "$Env:G_WORKSPACE/build/github-actions/build.sh"
- name: Package
run: C:\\ProgramData\\scoop\\apps\\mozilla-build\\current\\start-shell.bat "$Env:G_WORKSPACE/build/github-actions/packageZip.sh"
if: env.ENABLE_ARTIFACTS_MODE == 'true'
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: Artifact_Classic_Windows_${{ github.run_id }}
path: ./dist/waterfox*.zip
if: env.ENABLE_ARTIFACTS_MODE == 'true'
checksum:
runs-on: ubuntu-latest
needs: [build-linux, build-mac, build-windows, create-appimage]
steps:
- name: Download all artifacts
uses: actions/download-artifact@v2
with:
path: ./dist
if: env.ENABLE_ARTIFACTS_MODE == 'true'
- name: Generate checksum file
run: |
cd ./dist/
mv ./Artifact_Classic_*_${{ github.run_id }}/waterfox*.* ./
checksumFile=$(basename waterfox*.zip | sed 's/.win64.zip//g' | sed 's/$/.sha256/g')
sha256sum waterfox*.tar.bz2 | tee -a "$checksumFile"
sha256sum waterfox*.dmg | tee -a "$checksumFile"
sha256sum waterfox*.zip | tee -a "$checksumFile"
sha256sum waterfox*.AppImage | tee -a "$checksumFile"
if: env.ENABLE_ARTIFACTS_MODE == 'true'
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: Artifact_Classic_Checksum_${{ github.run_id }}
path: ./dist/*.sha256
if: env.ENABLE_ARTIFACTS_MODE == 'true'
create-appimage:
env:
UPDATE_INFO: "zsync|https://cdn.waterfox.net/releases/linux64/appimage/waterfox-classic-latest-x86_64.AppImage.zsync"
runs-on: ubuntu-latest
needs: [build-linux]
steps:
- name: Checkout branch
uses: actions/checkout@v2
if: env.ENABLE_ARTIFACTS_MODE == 'true'
- name: Download all artifacts
uses: actions/download-artifact@v2
with:
path: ./dist
if: env.ENABLE_ARTIFACTS_MODE == 'true'
- name: Create AppImage
run: |
sudo apt-get update
sudo apt-get install appstream
./build/github-actions/appimage/create_appimage.sh
if: env.ENABLE_ARTIFACTS_MODE == 'true'
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: Artifact_Classic_AppImage_${{ github.run_id }}
path: |
./dist/waterfox-classic-*-x86_64.AppImage
./dist/waterfox-classic-*-x86_64.AppImage.zsync
if: env.ENABLE_ARTIFACTS_MODE == 'true'