-
-
Notifications
You must be signed in to change notification settings - Fork 142
111 lines (104 loc) · 3.94 KB
/
erlang.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
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
linux:
runs-on: ubuntu-latest
name: OTP ${{ matrix.otp }} ${{ matrix.os }}.${{ matrix.compiler.compiler }}
container:
image: erlang:${{matrix.otp}}
strategy:
matrix:
os: [ linux ]
compiler:
- { compiler: GNU-12, CC: gcc-12, CXX: g++-12 }
- { compiler: GNU-11, CC: gcc-11, CXX: g++-11 }
- { compiler: LLVM-12, CC: clang-12, CXX: clang++-12 }
- { compiler: LLVM-11, CC: clang-11, CXX: clang++-11 }
otp: [27]
steps:
- uses: actions/checkout@v2
- name: OTP Version
run: erl -eval '{ok, Version} = file:read_file(filename:join([code:root_dir(), "releases", erlang:system_info(otp_release), "OTP_VERSION"])), io:format("Version=~s\n", [Version]), halt().' -noshell -noinput;
- name: Fix Ownership
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Build
run: |
make info
make
- name: Test
run: |
adduser --disabled-password --gecos '' newuser
chown -R newuser:newuser .
su -c "make test" newuser
# macOS:
# name: OTP ${{ matrix.otp }} ${{ matrix.os }}.${{ matrix.compiler.compiler }}
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: [ macos-latest ]
# compiler:
# - { compiler: XCode, CC: cc, CXX: c++ }
# otp: [25]
# steps:
# - uses: actions/checkout@v2
# - name: Install Base Dependencies
# run: |
# brew update > /dev/null || true
# brew tap Homebrew/bundle
# brew install erlang
# brew install rebar3
# #brew bundle --verbose
# - name: Fix Ownership
# run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
# - name: Build
# env:
# CC: ${{ matrix.compiler.CC }}
# CXX: ${{ matrix.compiler.CXX }}
# SRC_DIR: ${{ github.workspace }}
# BUILD_DIR: ${{ github.workspace }}/build
# INSTALL_PREFIX: ${{ github.workspace }}/install
# run: erl -eval '{ok, Version} = file:read_file(filename:join([code:root_dir(), "releases", erlang:system_info(otp_release), "OTP_VERSION"])), io:format("Version=~s\n", [Version]), halt().' -noshell -noinput
# - name: Build
# run: make
# - name: Test
# run: make test
# windows-msys2:
# name: OTP ${{ matrix.otp }} ${{ matrix.os }}.${{ matrix.msys2.msystem }}.${{ matrix.compiler.compiler }}
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# os: [ windows-latest ]
# msys2:
# - { msystem: MINGW64, arch: x86_64 }
# compiler:
# - { compiler: GNU, CC: gcc, CXX: g++ }
# - { compiler: LLVM, CC: clang, CXX: clang++ }
# otp: ["24.1", "24.2"]
# defaults:
# run:
# shell: msys2 {0}
# steps:
# - uses: actions/checkout@v2
# - uses: msys2/setup-msys2@v2
# with:
# msystem: ${{ matrix.msys2.msystem }}
# install: |
# pacman -Ss bash curl git base-devel mingw-w64-${{ matrix.msys2.arch }}-toolchain mingw-w64-${{ matrix.msys2.arch }}-gcc mingw-w64-${{ matrix.msys2.arch }}-clang mingw-w64-${{ matrix.msys2.arch }}-cmake mingw-w64-${{ matrix.msys2.arch }}-ninja mingw-w64-${{ matrix.msys2.arch }}-zlib erlang rebar3
# update: true
# - name: Build And Test
# env:
# CC: ${{ matrix.compiler.CC }}
# CXX: ${{ matrix.compiler.CXX }}
# SRC_DIR: ${{ github.workspace }}
# BUILD_DIR: ${{ github.workspace }}/build
# INSTALL_PREFIX: ${{ github.workspace }}/install
# run: |
# erl -eval '{ok, Version} = file:read_file(filename:join([code:root_dir(), "releases", erlang:system_info(otp_release), "OTP_VERSION"])), io:format("Version=~s\n", [Version]), halt().' -noshell;
# make
#