Skip to content

Commit

Permalink
External Release v2022.08.11
Browse files Browse the repository at this point in the history
General:
- Drop KNC Support

Added:
- Support Clang14 static build (Resolves #283)

Modified:
- Examples: Improve encoding for non-vector 64bit GPR instructions
- Examples: Support repeatable "-set" knob for setting multiple operands (xed.c
and xed-ex1.c)

Fixed:
- Fixed decoder length check (ILD) for VEX instructions
- Fixed STACKPUSH, STACKPOP registers definition
- Fixed registers definition for the instructions: SWAPGS FXTRACT, F[,A]PTAN, and FSINCOS.
- Fixed lock documentation (#280)
- Improve EVEX Ubit handling and error detection
  • Loading branch information
sdeadmin authored Aug 11, 2022
1 parent ef19f00 commit 1ce1036
Show file tree
Hide file tree
Showing 193 changed files with 4,668 additions and 9,042 deletions.
31 changes: 31 additions & 0 deletions .github/actions/load-matrix/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Load Matrix of strategy
description: Load Matrix of strategy
inputs:
matrix_kind:
description: 'set test matrix kind (sanity or nightly)'
required: true
type: string
outputs:
matrix:
description: "strategy matrix in Json format"
value: ${{ steps.matrix_json.outputs.json }}
matrix_table:
description: "strategy matrix in html table format"
value: ${{ steps.matrix_table.outputs.table }}
runs:
using: composite
steps:
- name: Generate test Json matrix
shell: bash
id: matrix_json
run: |
JSON=$(python3 .github/scripts/gen_matrix.py --${{inputs.matrix_kind}})
echo $JSON
echo "::set-output name=json::${JSON//%/%25}"
- name: Generate test html table matrix
shell: bash
id: matrix_table
run: |
TABLE=$(python3 .github/scripts/gen_matrix.py --${{inputs.matrix_kind}} --html)
echo $TABLE
echo "::set-output name=table::${TABLE//%/%25}"
168 changes: 0 additions & 168 deletions .github/scripts/ci_external.py

This file was deleted.

152 changes: 152 additions & 0 deletions .github/scripts/gen_matrix.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
import argparse
from collections import defaultdict
import dataclasses
import json
from pathlib import Path
from typing import List


##### Init test matrix DB #####
# GitHub workflow YML configuration file expects the below data structure: dict('include':list)
# Change it carefully if needed!!!
@dataclasses.dataclass
class Axis:
os: str
compiler: str
ver: str

def __lt__(self, other):
assert (self.compiler ==
other.compiler), 'Can not compare different compiler versions'
default_ver = [0, 0, 0]
# Convert string to array of integers
my_ver = [int(i) for i in self.ver.split('.')]
other_ver = [int(i) for i in other.ver.split('.')]
# Force 3 elements list (Major, minor, patch)
# If element is missing, fill with zeros
my_ver = [my_ver + default_ver][:3]
other_ver = [other_ver + default_ver][:3]
return my_ver < other_ver


@dataclasses.dataclass
class Matrix:
include: List[Axis]


sanity_matrix = Matrix(
include=[
Axis(
os='Linux',
compiler='gcc',
ver='12.1.0'
),
Axis(
os='Linux',
compiler='clang',
ver='14.0.6'
),
Axis(
os='Windows',
compiler='clang',
ver='14.0.6'
),
Axis(
os='Windows',
compiler='msvs',
ver='17' # Visual Studio 2022
),
]
)

# Nightly extends the sanity matrix
nightly_matrix = Matrix(
include=sanity_matrix.include +
[
Axis(
os='Linux',
compiler='gcc',
ver='11.2.0'
),
Axis(
os='Linux',
compiler='clang',
ver='13.0.1'
),
Axis(
os='Windows',
compiler='msvs',
ver='16' # Visual Studio 2019
),
]
)

#######################################


def setup():
parser = argparse.ArgumentParser(
description='Generate test matrix for GitHub Actions workflows')
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument('--sanity',
help='Print test matrix for sanity workflows',
action="store_true")
group.add_argument('--nightly',
help='Print test matrix for nightly workflows',
action="store_true")
parser.add_argument('--html',
help='Generate html table to stdout',
action='store_true',
default=False)
args = parser.parse_args()
return args


def get_latest_version(compiler):
'''return a string of the latest supported compiler version'''
zero_v = '0'
latest = Axis(os='', compiler=compiler, ver=zero_v)
for d in nightly_matrix.include:
if d.compiler == compiler and latest < d:
latest = d

assert latest.ver != zero_v, f'Could not find latest version of {compiler}'
return str(latest.ver)


def gen_tests_table(matrix):
"""Generate GitHub test matrix in a format of HTML table"""
os_set = set()
compiler_set = set()
for m in matrix:
os_set.add(m.os) # store all unique operating systems
compiler_set.add(m.compiler) # store all unique compilers

#keys of db are operating systems, values are dictionaries with compilers as keys
db = {o: defaultdict(list) for o in os_set}

# map all versions to the respective operating system and compiler
for m in matrix:
db[m.os][m.compiler].append(m.ver)

# Generate the html table
table = '<th>\t</th>'
table += ''.join('<th>' + x + '</th>' for x in compiler_set) #generate the table's header
for o in os_set: # Append row
table += f'<tr><td>{o}</td>'
for c in compiler_set: # Append column
table += '<td>' + ', '.join(db[o][c]) + '</td>'
table += '</tr>'
html = '<table border=1 class="stocktable" id="table1">' + table + '</table>'
return html

if __name__ == "__main__":
args = setup()
matrix = sanity_matrix if args.sanity else nightly_matrix

if args.html:
print(gen_tests_table(matrix.include))
else:
print(json.dumps(dataclasses.asdict(matrix)))


Loading

0 comments on commit 1ce1036

Please sign in to comment.