-
Notifications
You must be signed in to change notification settings - Fork 6
152 lines (146 loc) · 4.99 KB
/
Copy pathci.yml
File metadata and controls
152 lines (146 loc) · 4.99 KB
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
name: ci
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
Ubuntu:
name: OTP ${{matrix.otp}} / rebar3 ${{matrix.rebar3}} / OS ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-24.04']
otp: ['28', '27', '26']
rebar3: ['3.25.0']
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
rebar3-version: ${{matrix.rebar3}}
# caches
- name: Restore _build
uses: actions/cache@v4
with:
path: _build
key: _build-cache-for-os-${{matrix.os}}-otp-${{matrix.otp}}-rebar3-${{matrix.rebar3}}-hash-${{hashFiles('rebar.lock')}}
- name: Restore rebar3's cache
uses: actions/cache@v4
with:
path: ~/.cache/rebar3
key: rebar3-cache-for-os-${{matrix.os}}-otp-${{matrix.otp}}-rebar3-${{matrix.rebar3}}-hash-${{hashFiles('rebar.lock')}}
# tests
- run: rebar3 as test get-deps
- run: rebar3 as test compile
- run: rebar3 as test ct
- run: rebar3 dialyzer
if: ${{ matrix.otp == '28' && matrix.os == 'ubuntu-24.04' }}
- name: Run coverage
if: ${{ matrix.otp == '28' && matrix.os == 'ubuntu-24.04' }}
run: |
rebar3 as test codecov analyze
gcov -o c_src fast_pbkdf2
- name: Upload coverage reports to Codecov
if: ${{ matrix.otp == '28' && matrix.os == 'ubuntu-24.04' }}
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
MacOS:
name: OTP ${{matrix.otp}} / rebar3 ${{matrix.rebar3}} / OS ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: ['macos-14', 'macos-15']
otp: ['28', '27']
rebar3: ['3.25.0']
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v4
# OS setups
- name: Prepare Brew
run: |
brew --version
brew cleanup --prune=all -s
brew autoremove
brew untap homebrew/cask homebrew/core
brew update
- run: brew install erlang rebar3
# caches
- name: Restore _build
uses: actions/cache@v4
with:
path: _build
key: _build-cache-for-os-${{matrix.os}}-otp-${{matrix.otp}}-rebar3-${{matrix.rebar3}}-hash-${{hashFiles('rebar.lock')}}
- name: Restore rebar3's cache
uses: actions/cache@v4
with:
path: ~/.cache/rebar3
key: rebar3-cache-for-os-${{matrix.os}}-otp-${{matrix.otp}}-rebar3-${{matrix.rebar3}}-hash-${{hashFiles('rebar.lock')}}
# tests
- run: rebar3 as test get-deps
- run: >
CFLAGS="-I/opt/homebrew/opt/openssl/include"
LDFLAGS="-L/opt/homebrew/opt/openssl/lib"
rebar3 as test compile
- run: rebar3 as test ct
s390x:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Setup emulator
run: sudo docker run --rm --privileged tonistiigi/binfmt:qemu-v9.2.0
- name: Run build
uses: uraimo/run-on-arch-action@v2.8.1
with:
arch: s390x
distro: ubuntu_latest
install: |
apt-get update -y
DEBIAN_FRONTEND=noninteractive apt-get install -y rebar3 gcc libssl-dev
run: rebar3 as test do get-deps, compile, ct
# Windows:
# name: OTP ${{matrix.otp}} / rebar3 ${{matrix.rebar3}} / OS ${{matrix.os}}
# strategy:
# fail-fast: false
# matrix:
# os: ['windows-2022']
# otp: ['27']
# rebar3: ['3.24.0']
# runs-on: ${{matrix.os}}
# steps:
# - uses: actions/checkout@v4
# - uses: erlef/setup-beam@v1
# with:
# otp-version: ${{matrix.otp}}
# rebar3-version: ${{matrix.rebar3}}
# - name: Windows - Enable Developer Command Prompt
# uses: ilammy/msvc-dev-cmd@v1
# if: ${{ matrix.os == 'windows-2022' }}
# - name: Windows - Install openssl
# shell: pwsh
# run: |
# choco install openssl
# echo "OPENSSL_INSTALL_DIR=""C:\Program Files\OpenSSL""" >> $env:GITHUB_ENV
# if: ${{ matrix.os == 'windows-2022' }}
# # caches
# - name: Restore _build
# uses: actions/cache@v4
# with:
# path: _build
# key: _build-cache-for-os-${{matrix.os}}-otp-${{matrix.otp}}-rebar3-${{matrix.rebar3}}-hash-${{hashFiles('rebar.lock')}}
# - name: Restore rebar3's cache
# uses: actions/cache@v4
# with:
# path: ~/.cache/rebar3
# key: rebar3-cache-for-os-${{matrix.os}}-otp-${{matrix.otp}}-rebar3-${{matrix.rebar3}}-hash-${{hashFiles('rebar.lock')}}
# # tests
# - run: dir "C:\Program Files\OpenSSL\"
# - run: rebar3 as test get-deps
# - run: >
# set CFLAGS="/I${OPENSSL_INSTALL_DIR}/include" &
# set LDFLAGS="/LIBPATH:${OPENSSL_INSTALL_DIR}/lib" &
# rebar3 as test compile
# - run: rebar3 as test ct