File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Test
2+
3+ on :
4+ pull_request :
5+ types :
6+ - opened
7+ - reopened
8+ - synchronize
9+ push :
10+ branches :
11+ - " **"
12+ tags-ignore :
13+ - " *"
14+
15+ env :
16+ NO_INTERACTION : 1
17+
18+ jobs :
19+ build :
20+ runs-on : ${{ matrix.os }}
21+ strategy :
22+ fail-fast : false
23+ matrix :
24+ os : [ubuntu-latest]
25+ php-version : ["8.0", "7.4", "7.3"]
26+
27+ steps :
28+ - uses : actions/checkout@v2
29+ - name : Git Commit Hash
30+ id : git_commit
31+ run : |
32+ echo "::set-output name=hash::$(git rev-parse HEAD)"
33+
34+ - name : Cancel Previous Runs
35+ if : contains(matrix.os, 'ubuntu') && contains(matrix.php-version, '8.0')
36+ uses : styfle/cancel-workflow-action@0.6.0
37+ with :
38+ access_token : ${{ github.token }}
39+
40+ - name : Install Linux Dependencies
41+ if : contains(matrix.os, 'ubuntu')
42+ run : sudo apt-get install -y autoconf build-essential gcc g++ valgrind
43+ - name : Install PHP
44+ id : install_php
45+ uses : shivammathur/setup-php@v2
46+ with :
47+ php-version : ${{ matrix.php-version }}
48+ tools : phpize
49+
50+ - name : Build
51+ run : |
52+ phpize
53+ ./configure --enable-bencode
54+ make -j$(nproc)
55+ - name : Test
56+ run : |
57+ chmod 600 ./.valgrindrc
58+ make test TESTS="-m"
Original file line number Diff line number Diff line change 1+ name : GitLab Sync
2+
3+ on : push
4+
5+ jobs :
6+ branch-sync :
7+ name : Synchronise Branches
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : repo-sync
11+ uses : wei/git-sync@v2
12+ with :
13+ source_repo : " https://github.com/Frederick888/php-bencode.git"
14+ source_branch : " refs/remotes/source/*"
15+ destination_repo : " https://Frederick888:${{ secrets.GITLAB_ACCESS_TOKEN }}@git.tsundere.moe/Frederick888/php-bencode.git"
16+ destination_branch : " refs/heads/*"
17+
18+ tag-sync :
19+ name : Synchronise Tags
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : repo-sync
23+ uses : wei/git-sync@v2
24+ with :
25+ source_repo : " https://github.com/Frederick888/php-bencode.git"
26+ source_branch : " refs/tags/*"
27+ destination_repo : " https://Frederick888:${{ secrets.GITLAB_ACCESS_TOKEN }}@git.tsundere.moe/Frederick888/php-bencode.git"
28+ destination_branch : " refs/tags/*"
Original file line number Diff line number Diff line change @@ -15,23 +15,19 @@ before_script:
1515 - chmod 600 ./.valgrindrc
1616 - make test TESTS="-m"
1717 artifacts :
18- name : ' ${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}'
18+ name : " ${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}"
1919 expire_in : 2 weeks
2020 paths :
2121 - modules/bencode.so
2222
23- php71 :
23+ php80 :
2424 extends : .php
25- image : php:7.1
25+ image : php:8.0
2626
27- php72 :
27+ php74 :
2828 extends : .php
29- image : php:7.2
29+ image : php:7.4
3030
3131php73 :
3232 extends : .php
3333 image : php:7.3
34-
35- php74 :
36- extends : .php
37- image : php:7.4
Original file line number Diff line number Diff line change 11Code Status
22===
3- Travis CI [ ![ Travis Status ] ( https://travis-ci.org /Frederick888/php-bencode. svg?branch=master )] ( https://travis-ci.org /Frederick888/php-bencode )
3+ Github Actions [ ![ Build and Test ] ( https://github.com /Frederick888/php-bencode/actions/workflows/php.yml/badge. svg )] ( https://github.com /Frederick888/php-bencode/actions/workflows/php.yml )
44GitLab CI [ ![ GitLab CI Status] ( https://git.tsundere.moe/Frederick888/php-bencode/badges/master/pipeline.svg )] ( https://git.tsundere.moe/Frederick888/php-bencode/commits/master )
55
66Introduction
You can’t perform that action at this time.
0 commit comments