Skip to content

Commit df2fc3f

Browse files
committed
Modernize CI configuration
- Remove mentions of Travis CI; - Upgrade all actions to their latest release (and location); - Upgrade host OS to use latest tag; - Only test the latest (and master) dmd and ldc;
1 parent 8bc62db commit df2fc3f

File tree

3 files changed

+35
-73
lines changed

3 files changed

+35
-73
lines changed

.github/workflows/main.yml

+35-27
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,63 @@
11
# Test libsodiumd on all three platforms
22
name: Test
33

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'
516

617
jobs:
718
main:
819
name: Run
920
strategy:
1021
fail-fast: false
1122
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 }
2431

2532
runs-on: ${{ matrix.os }}
2633
timeout-minutes: 30
2734
steps:
2835

2936
# Checkout this repository
30-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v4
38+
with:
39+
# For codecov
40+
fetch-depth: 2
3141
# Install the D compiler
3242
- name: Prepare compiler
33-
uses: mihails-strasuns/setup-dlang@v1
43+
uses: dlang-community/setup-dlang@v1
3444
with:
3545
compiler: ${{ matrix.dc }}
3646

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'
4052
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
4856
4957
- name: '[Windows] Load libsodium from cache'
5058
id: cache-libsodium
5159
if: runner.os == 'Windows'
52-
uses: actions/cache@v1
60+
uses: actions/cache@v4
5361
with:
5462
path: ${{ github.workspace }}\lib\libsodium\x64\Release\v142\static\
5563
key: libsodium-1.0.18
@@ -87,6 +95,6 @@ jobs:
8795
if %errorlevel% neq 0 exit /b %errorlevel%
8896
8997
- name: 'Upload code coverage'
90-
uses: codecov/codecov-action@v1
98+
uses: codecov/codecov-action@v4
9199
with:
92100
flags: unittests

.travis.yml

-45
This file was deleted.

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
## Libsodiumd: D bindings for libsodium
22

3-
[![Build Status](https://travis-ci.com/geod24/libsodiumd.svg?branch=upstream-1.0.17)](https://travis-ci.com/geod24/libsodiumd)
43
[![DUB Package](https://img.shields.io/dub/v/libsodiumd.svg)](https://code.dlang.org/packages/libsodiumd)
54

65
Currently supported version: v1.0.18 (released 2019-05-31)

0 commit comments

Comments
 (0)