forked from mozilla/neqo
-
Notifications
You must be signed in to change notification settings - Fork 1
112 lines (97 loc) · 3.89 KB
/
check.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
name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Build & test
strategy:
# fail-fast: false
matrix:
os: [windows-latest] # ubuntu-latest, macos-latest] #
rust-toolchain: [stable] # , 1.65.0, beta]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.os == 'windows-latest' && 'msys2 {0}' || 'bash' }}
steps:
# - name: Install Rust
# uses: actions-rust-lang/setup-rust-toolchain@v1
# with:
# toolchain: ${{ matrix.rust-toolchain }}
# components: rustfmt, clippy
# cache: false # enabling the cache leads to spurious failures
# - name: Install dependencies (Linux)
# if: runner.os == 'Linux'
# env:
# DEBIAN_FRONTEND: noninteractive
# run: |
# sudo apt-get update
# sudo apt-get install -y --no-install-recommends gyp mercurial ninja-build
# - name: Install dependencies (MacOS)
# if: runner.os == 'MacOS'
# run: |
# brew install ninja mercurial
# python3 -m pip install gyp-next
# echo "$(python3 -m site --user-base)/bin" >> $GITHUB_PATH
# - name: Install dependencies (Windows)
# if: runner.os == 'Windows'
# shell: bash
# run: |
# choco install --no-progress MozillaBuild
# echo "C:/mozilla-build/bin" >> $GITHUB_PATH
# echo "C:/mozilla-build/msys2/usr/bin" >> $GITHUB_PATH
# echo "MOZILLABUILD=C:/mozilla-build" >> $GITHUB_ENV
# echo "MOZBUILD_STATE_PATH=C:/mozbuild-state" >> $GITHUB_ENV
# echo "GYP_MSVS_OVERRIDE_PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise" >> $GITHUB_ENV
# echo "GYP_MSVS_VERSION=2022" >> $GITHUB_ENV
# # echo "OS_TARGET=WIN95" >> $GITHUB_ENV
# - name: Fetch NSS and NSPR
# shell: bash
# run: |
# hg clone https://hg.mozilla.org/projects/nspr "$NSPR_DIR"
# git clone --depth=1 https://github.com/nss-dev/nss "$NSS_DIR"
# "$NSS_DIR"/build.sh -v --clang
# env:
# NSS_DIR: ${{ github.workspace }}/nss
# NSPR_DIR: ${{ github.workspace }}/nspr
- name: Install dependencies (Windows)
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
with:
install: nsinstall ninja python-six mercurial git # gyp in msys2 is too old, install separately
# path-type: inherit
- name: Install more dependencies (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
python3 -m pip install gyp-next
# echo "OS_TARGET=WIN95" >> $GITHUB_ENV
echo "GYP_MSVS_OVERRIDE_PATH=C:\Program Files\Microsoft Visual Studio\2022\Enterprise" >> $GITHUB_ENV
echo "GYP_MSVS_VERSION=2022" >> $GITHUB_ENV
hg clone https://hg.mozilla.org/projects/nspr "$NSPR_DIR"
git clone --depth=1 https://github.com/nss-dev/nss "$NSS_DIR"
env:
NSS_DIR: ${{ github.workspace }}/nss
NSPR_DIR: ${{ github.workspace }}/nspr
- name: Build
run: |
${{ github.workspace }}\nss\build.sh -v --msvc
# env:
# NSS_DIR: ${{ github.workspace }}/nss
# NSPR_DIR: ${{ github.workspace }}/nspr
# - name: Checkout
# uses: actions/checkout@v4
# - name: Build
# run: cargo +${{ matrix.rust-toolchain }} build -v --all-targets
# - name: Run tests
# run: cargo +${{ matrix.rust-toolchain }} test -v
# env:
# RUST_BACKTRACE: 1
# RUST_LOG: neqo=debug
# - name: Check formatting
# run: cargo +${{ matrix.rust-toolchain }} fmt --all -- --check
# if: ${{ success() || failure() }}
# - name: Clippy
# run: cargo +${{ matrix.rust-toolchain }} clippy -v --tests -- -D warnings
# if: ${{ success() || failure() }}