|
1 | 1 | # Test libsodiumd on all three platforms
|
2 | 2 | name: Test
|
3 | 3 |
|
4 |
| -on: [pull_request, push] |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: |
| 7 | + - 'upstream-*' |
| 8 | + tags: |
| 9 | + - 'v*' |
| 10 | + pull_request: |
| 11 | + branches: |
| 12 | + - 'upstream-*' |
| 13 | + # Do a periodic build (every Monday at 0600) to ensure integrity |
| 14 | + schedule: |
| 15 | + - cron: '0 6 * * 1' |
5 | 16 |
|
6 | 17 | jobs:
|
7 | 18 | main:
|
8 | 19 | name: Run
|
9 | 20 | strategy:
|
10 | 21 | fail-fast: false
|
11 | 22 | matrix:
|
12 |
| - os: [ ubuntu-18.04, macOS-10.15, windows-2019 ] |
13 |
| - # DMD < 2.087.1 does not work on Mac OSX Catalina (10.15) because druntime used |
14 |
| - # a private symbol, hence this is the minimum required version |
15 |
| - # However, while compiling with DMD 2.087.1 works on Catalina, |
16 |
| - # the distributed binary was not built with it until 2.090.0 |
17 |
| - dc: [ dmd-master, ldc-master, dmd-latest, ldc-latest, dmd-2.090.0, ldc-1.17.0 ] |
18 |
| - exclude: |
19 |
| - # https://github.com/dlang/dub/issues/1914 |
20 |
| - # https://github.com/dlang/dub/issues/1915 |
21 |
| - - { os: windows-2019, dc: dmd-master } |
22 |
| - - { os: windows-2019, dc: dmd-latest } |
23 |
| - - { os: windows-2019, dc: dmd-2.090.0 } |
| 23 | + include: |
| 24 | + - { os: macos-latest, dc: ldc-latest } |
| 25 | + - { os: ubuntu-latest, dc: dmd-latest } |
| 26 | + - { os: ubuntu-latest, dc: ldc-latest } |
| 27 | + # https://github.com/dlang/dub/issues/1914 |
| 28 | + # https://github.com/dlang/dub/issues/1915 |
| 29 | + # - { os: windows-latest, dc: dmd-latest } |
| 30 | + # - { os: windows-latest, dc: ldc-latest } |
24 | 31 |
|
25 | 32 | runs-on: ${{ matrix.os }}
|
26 | 33 | timeout-minutes: 30
|
27 | 34 | steps:
|
28 | 35 |
|
29 | 36 | # Checkout this repository
|
30 |
| - - uses: actions/checkout@v2 |
| 37 | + - uses: actions/checkout@v4 |
| 38 | + with: |
| 39 | + # For codecov |
| 40 | + fetch-depth: 2 |
31 | 41 | # Install the D compiler
|
32 | 42 | - name: Prepare compiler
|
33 |
| - uses: mihails-strasuns/setup-dlang@v1 |
| 43 | + uses: dlang-community/setup-dlang@v1 |
34 | 44 | with:
|
35 | 45 | compiler: ${{ matrix.dc }}
|
36 | 46 |
|
37 |
| - # Install os-specific packages |
38 |
| - - name: '[Posix] Install dependencies' |
39 |
| - if: runner.os == 'macOS' || runner.os == 'Linux' |
| 47 | + # Install os-specific packages. |
| 48 | + # We only need pkg-config and libsodium, which *might* already be installed. |
| 49 | + # See https://github.com/actions/runner-images for included software / libraries |
| 50 | + - name: '[Linux] Install dependencies' |
| 51 | + if: runner.os == 'Linux' |
40 | 52 | run: |
|
41 |
| - if [ '${{ runner.os }}' == 'macOS' ]; then |
42 |
| - brew install pkg-config libsodium |
43 |
| - elif [ '${{ runner.os }}' == 'Linux' ]; then |
44 |
| - sudo add-apt-repository ppa:ubuntu-toolchain-r/test |
45 |
| - sudo apt-get update |
46 |
| - sudo apt-get install libsodium-dev |
47 |
| - fi |
| 53 | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test |
| 54 | + sudo apt-get update |
| 55 | + sudo apt-get install libsodium-dev |
48 | 56 |
|
49 | 57 | - name: '[Windows] Load libsodium from cache'
|
50 | 58 | id: cache-libsodium
|
51 | 59 | if: runner.os == 'Windows'
|
52 |
| - uses: actions/cache@v1 |
| 60 | + uses: actions/cache@v4 |
53 | 61 | with:
|
54 | 62 | path: ${{ github.workspace }}\lib\libsodium\x64\Release\v142\static\
|
55 | 63 | key: libsodium-1.0.18
|
|
87 | 95 | if %errorlevel% neq 0 exit /b %errorlevel%
|
88 | 96 |
|
89 | 97 | - name: 'Upload code coverage'
|
90 |
| - uses: codecov/codecov-action@v1 |
| 98 | + uses: codecov/codecov-action@v4 |
91 | 99 | with:
|
92 | 100 | flags: unittests
|
0 commit comments