summaryrefslogtreecommitdiff
path: root/.github/workflows/awslc.yml
blob: 6e012ea45ead984f739fca6c4179b371fe8efa11 (plain)
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
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl

name: Linux

on:
  push:
    branches:
    - master
    - '*/ci'
    paths-ignore:
    - '**/*.md'
    - '.azure-pipelines.yml'
    - '.circleci/**'
    - '.cirrus.yml'
    - 'appveyor.yml'
    - 'packages/**'
    - 'plan9/**'
    - 'projects/**'
    - 'winbuild/**'
  pull_request:
    branches:
    - master
    paths-ignore:
    - '**/*.md'
    - '.azure-pipelines.yml'
    - '.circleci/**'
    - '.cirrus.yml'
    - 'appveyor.yml'
    - 'packages/**'
    - 'plan9/**'
    - 'projects/**'
    - 'winbuild/**'

concurrency:
  # Hardcoded workflow filename as workflow name above is just Linux again
  group: awslc-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true

permissions: {}

jobs:
  autoconf:
    name: awslc (autoconf)
    runs-on: 'ubuntu-latest'
    timeout-minutes: 30

    steps:
    - run: |
        sudo apt-get update --yes
        sudo apt-get install --yes libtool autoconf automake pkg-config stunnel4
        # ensure we don't pick up openssl in this build
        sudo apt remove --yes libssl-dev
        sudo python3 -m pip install impacket
      name: 'install prereqs and impacket'

    - run: |
        curl -LOsSf --retry 6 --retry-connrefused --max-time 999 https://github.com/awslabs/aws-lc/archive/refs/tags/v1.3.0.tar.gz
        tar xzf v1.3.0.tar.gz
        mkdir aws-lc-1.3.0-build
        cd aws-lc-1.3.0-build
        cmake -DCMAKE_INSTALL_PREFIX=$HOME/awslc ../aws-lc-1.3.0
        cmake --build . --parallel
        cmake --install .
      name: 'install awslc'

    - uses: actions/checkout@v3

    - run: autoreconf -fi
      name: 'autoreconf'

    - run: ./configure --enable-warnings --enable-werror --with-openssl=$HOME/awslc
      name: 'configure'

    - run: make -j 2 V=1
      name: 'make'

    - run: make -j 2 V=1 examples
      name: 'make examples'

    - run: make -j 2 V=1 -C tests
      name: 'make tests'

    - run: make V=1 test-ci
      name: 'run tests'

  cmake:
    name: awslc (cmake)
    runs-on: 'ubuntu-latest'
    timeout-minutes: 15

    steps:
    - run: |
        sudo apt-get update
        sudo apt-get install cmake stunnel4
        # ensure we don't pick up openssl in this build
        sudo apt remove --yes libssl-dev
        sudo python3 -m pip install impacket
      name: 'install prereqs and impacket'

    - run: |
        curl -LOsSf --retry 6 --retry-connrefused --max-time 999 https://github.com/awslabs/aws-lc/archive/refs/tags/v1.3.0.tar.gz
        tar xzf v1.3.0.tar.gz
        mkdir aws-lc-1.3.0-build
        cd aws-lc-1.3.0-build
        cmake -DCMAKE_INSTALL_PREFIX=$HOME/awslc ../aws-lc-1.3.0
        cmake --build . --parallel
        cmake --install .
      name: 'install awslc'

    - uses: actions/checkout@v3

    # CMAKE_COMPILE_WARNING_AS_ERROR is available in cmake 3.24 or later
    - run: cmake -Bbuild -DOPENSSL_ROOT_DIR=$HOME/awslc -DBUILD_SHARED_LIBS=ON -DCMAKE_COMPILE_WARNING_AS_ERROR=ON .
      name: 'cmake generate'

    - run: cmake --build build --parallel
      name: 'cmake build'

    - run: cmake --install build --prefix $HOME/curl --strip
      name: 'cmake install'