OSDN Git Service

Run 'apt-get update' before 'apt-get install'
[hengbandforosx/hengbandosx.git] / .github / workflows / test-linux-build.yaml
1 # Verify that the software builds on Linux either with English or Japanese
2 # enabled.
3
4 name: test-linux-build
5
6 on:
7   push:
8     branches: [ 'macos-develop', 'macos-2-2-1', 'macos-1-6-2' ]
9   pull_request:
10
11 jobs:
12   english:
13     name: English
14     runs-on: ubuntu-latest
15     env:
16       # This will be passed to all invocations of configure for this test.
17       # Could drop --disable-net if libcurl is installed.
18       DEFAULT_CONFIGURE_OPTIONS: --disable-japanese --disable-net
19
20     steps:
21       - name: Clone Project
22         uses: actions/checkout@v3
23         with:
24           submodules: true
25
26       # Requires automake and autoconf; install those via apt-get.
27       - name: Install Build Dependencies
28         run: |
29           sudo apt-get update
30           sudo apt-get install autoconf automake
31
32       - name: Build
33         run: |
34           ./bootstrap
35           ./configure ${{ env.DEFAULT_CONFIGURE_OPTIONS }}
36           make
37
38       # Use make distcheck to verify that configure.ac and the Makefile.am
39       # files properly list all the dependencies and that a build outside of
40       # of the source tree works.
41       - name: Distcheck
42         run: |
43           ./bootstrap
44           ./configure ${{ env.DEFAULT_CONFIGURE_OPTIONS }}
45           make DISTCHECK_CONFIGURE_FLAGS="${{ env.DEFAULT_CONFIGURE_OPTIONS }} --disable-pch" \
46             distcheck
47
48   # Unless building 1.6.2; make distcheck will not work with the Japanese
49   # build (the preprocessing to change the source encoding modifies the source
50   # tree) so don't test that for the Japanese build.
51   japanese:
52     name: Japanese
53     runs-on: ubuntu-latest
54     env:
55       # This will be passed to all invocations of configure for this test.
56       DEFAULT_CONFIGURE_OPTIONS: --disable-pch
57
58     steps:
59       - name: Clone Project
60         uses: actions/checkout@v3
61         with:
62           submodules: true
63
64       # Requires automake, autoconf, and, unless building the 1.6.2 version,
65       # nkf.  Hengband 3.0.0 now requires libcurl if not configured with
66       # --disable-net.  Install those via apt-get.
67       - name: Install Build Dependencies
68         run: |
69           sudo apt-get update
70           sudo apt-get install automake autoconf nkf libcurl4-openssl-dev
71
72       - name: Build
73         run: |
74           ./bootstrap
75           ./configure ${{ env.DEFAULT_CONFIGURE_OPTIONS }}
76           make