jdk

Форк
0
/
build-macos.yml 
126 строк · 4.0 Кб
1
#
2
# Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
#
5
# This code is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 2 only, as
7
# published by the Free Software Foundation.  Oracle designates this
8
# particular file as subject to the "Classpath" exception as provided
9
# by Oracle in the LICENSE file that accompanied this code.
10
#
11
# This code is distributed in the hope that it will be useful, but WITHOUT
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14
# version 2 for more details (a copy is included in the LICENSE file that
15
# accompanied this code).
16
#
17
# You should have received a copy of the GNU General Public License version
18
# 2 along with this work; if not, write to the Free Software Foundation,
19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20
#
21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
# or visit www.oracle.com if you need additional information or have any
23
# questions.
24
#
25

26
name: 'Build (macos)'
27

28
on:
29
  workflow_call:
30
    inputs:
31
      platform:
32
        required: true
33
        type: string
34
      runs-on:
35
        required: true
36
        type: string
37
      extra-conf-options:
38
        required: false
39
        type: string
40
      make-target:
41
        required: false
42
        type: string
43
        default: 'product-bundles test-bundles'
44
      debug-levels:
45
        required: false
46
        type: string
47
        default: '[ "debug", "release" ]'
48
      xcode-toolset-version:
49
        required: true
50
        type: string
51
      configure-arguments:
52
        required: false
53
        type: string
54
      make-arguments:
55
        required: false
56
        type: string
57

58
jobs:
59
  build-macos:
60
    name: build
61
    runs-on: ${{ inputs.runs-on }}
62

63
    strategy:
64
      fail-fast: false
65
      matrix:
66
        debug-level: ${{ fromJSON(inputs.debug-levels) }}
67
        include:
68
          - debug-level: debug
69
            flags: --with-debug-level=fastdebug
70
            suffix: -debug
71

72
    steps:
73
      - name: 'Checkout the JDK source'
74
        uses: actions/checkout@v4
75

76
      - name: 'Get the BootJDK'
77
        id: bootjdk
78
        uses: ./.github/actions/get-bootjdk
79
        with:
80
          platform: ${{ inputs.platform }}
81

82
      - name: 'Get JTReg'
83
        id: jtreg
84
        uses: ./.github/actions/get-jtreg
85

86
      - name: 'Get GTest'
87
        id: gtest
88
        uses: ./.github/actions/get-gtest
89

90
      - name: 'Install toolchain and dependencies'
91
        run: |
92
          # Run Homebrew installation and xcode-select
93
          brew install autoconf make
94
          sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
95
          # This will make GNU make available as 'make' and not only as 'gmake'
96
          echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
97

98
      - name: 'Configure'
99
        run: >
100
          bash configure
101
          --with-conf-name=${{ inputs.platform }}
102
          ${{ matrix.flags }}
103
          --with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
104
          --with-boot-jdk=${{ steps.bootjdk.outputs.path }}
105
          --with-jtreg=${{ steps.jtreg.outputs.path }}
106
          --with-gtest=${{ steps.gtest.outputs.path }}
107
          --with-zlib=system
108
          --with-jmod-compress=zip-1
109
          ${{ inputs.extra-conf-options }} ${{ inputs.configure-arguments }} || (
110
          echo "Dumping config.log:" &&
111
          cat config.log &&
112
          exit 1)
113

114
      - name: 'Build'
115
        id: build
116
        uses: ./.github/actions/do-build
117
        with:
118
          make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
119
          platform: ${{ inputs.platform }}
120
          debug-suffix: '${{ matrix.suffix }}'
121

122
      - name: 'Upload bundles'
123
        uses: ./.github/actions/upload-bundles
124
        with:
125
          platform: ${{ inputs.platform }}
126
          debug-suffix: '${{ matrix.suffix }}'
127

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.