-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from fancycode/ci-actions
CI: Migrate to GitHub actions.
- Loading branch information
Showing
6 changed files
with
114 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: sdk | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
paths: | ||
- '.github/workflows/sdk.yml' | ||
- 'sdk/**' | ||
- 'scripts/check-sdk.py' | ||
pull_request: | ||
branches: [ master ] | ||
paths: | ||
- '.github/workflows/sdk.yml' | ||
- 'sdk/**' | ||
- 'scripts/check-sdk.py' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
check-latest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Check SDK version | ||
run: | | ||
./scripts/check-sdk.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
paths: | ||
- '.github/workflows/fuzzer.yml' | ||
- '**.c' | ||
- '**.cc' | ||
- '**.h' | ||
- 'Makefile' | ||
pull_request: | ||
branches: [ master ] | ||
paths: | ||
- '.github/workflows/fuzzer.yml' | ||
- '**.c' | ||
- '**.cc' | ||
- '**.h' | ||
- 'Makefile' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
fuzzer: | ||
env: | ||
CC: "clang" | ||
CXX: "clang++" | ||
CFLAGS: "-fsanitize=fuzzer,address" | ||
CXXFLAGS: "-fsanitize=fuzzer,address" | ||
LIB_FUZZING_ENGINE: "-fsanitize=fuzzer" | ||
|
||
strategy: | ||
matrix: | ||
fuzzer: | ||
- "7z_fuzzer" | ||
- "filters_fuzzer" | ||
- "lzma2dec_fuzzer" | ||
- "lzma2enc_fuzzer" | ||
- "lzmadec_fuzzer" | ||
- "lzmaenc_fuzzer" | ||
- "ppmdenc_fuzzer" | ||
- "xzdec_fuzzer" | ||
- "xzenc_fuzzer" | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
create-symlink: true | ||
|
||
- name: Build fuzzer | ||
run: | | ||
make ${{ matrix.fuzzer }} | ||
- name: Run fuzzer against corpus | ||
run: | | ||
if [ -d "corpus/${{ matrix.fuzzer }}" ]; then | ||
echo "Running ${{ matrix.fuzzer }} against corpus ..." | ||
./${{ matrix.fuzzer }} corpus/${{ matrix.fuzzer }}/* | ||
fi | ||
- name: Run fuzzer | ||
run: | | ||
./${{ matrix.fuzzer }} -max_total_time=10 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/python -u | ||
#!/usr/bin/python3 -u | ||
|
||
## | ||
## @copyright Copyright (c) 2019 Joachim Bauch <[email protected]> | ||
|
@@ -22,7 +22,7 @@ | |
import os.path | ||
import re | ||
import sys | ||
import urllib2 | ||
from urllib.request import urlopen | ||
|
||
URL = 'https://www.7-zip.org/sdk.html' | ||
|
||
|
@@ -44,36 +44,36 @@ def normalize_version(s): | |
try: | ||
version = int(s) | ||
except ValueError: | ||
print >> sys.stderr, 'Not a valid version: %s' % (s) | ||
print('Not a valid version: %s' % (s), file=sys.stderr) | ||
sys.exit(1) | ||
|
||
return '%.2d.%.2d' % (version / 100, version % 100) | ||
|
||
def main(): | ||
with file(VERSIONS_FILE, 'rb') as fp: | ||
with open(VERSIONS_FILE, 'r') as fp: | ||
match = GET_SDK_VERSION(fp.read()) | ||
if match is None: | ||
print >> sys.stderr, 'No version number found in %s' % (VERSIONS_FILE) | ||
print('No version number found in %s' % (VERSIONS_FILE), file=sys.stderr) | ||
sys.exit(1) | ||
|
||
sdk_version = match.group(1) | ||
|
||
print 'Checking for update of SDK version', sdk_version | ||
print('Checking for update of SDK version', sdk_version) | ||
|
||
fp = urllib2.urlopen(URL) | ||
data = fp.read() | ||
fp = urlopen(URL) | ||
data = fp.read().decode('utf-8') | ||
versions = SEARCH_SDK_DOWNLOADS(data) | ||
if not versions: | ||
print >> sys.stderr, 'No downloads found, check script.' | ||
print('No downloads found, check script.', file=sys.stderr) | ||
sys.exit(1) | ||
|
||
versions = sorted(map(normalize_version, versions))[::-1] | ||
print 'Found downloads for versions %s' % (', '.join(versions)) | ||
print('Found downloads for versions %s' % (', '.join(versions))) | ||
if sdk_version < versions[0]: | ||
print >> sys.stderr, 'Found newer version %s' % (versions[0]) | ||
print('Found newer version %s' % (versions[0]), file=sys.stderr) | ||
sys.exit(1) | ||
|
||
print 'Already using the latest version' | ||
print('Already using the latest version') | ||
|
||
if __name__ == '__main__': | ||
main() |
This file was deleted.
Oops, something went wrong.