add rust to CI
This commit is contained in:
parent
63698fd90f
commit
56ee3c5c43
1 changed files with 22 additions and 2 deletions
|
|
@ -2,25 +2,45 @@
|
|||
# See Notices.txt for copyright information
|
||||
on: [push, pull_request]
|
||||
|
||||
env:
|
||||
PDF_HASH=56372d23ece7e9e2c1b381a639443982a3e16e38109df1c141d655b779b61fdb
|
||||
OUTPUT_XML_HASH=c0b4592cbd0a3e59b9b2931a6a75a3d87ebf23bf453e8587a1522dd157f15ee9
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: debian-12
|
||||
container:
|
||||
image: git.libre-chip.org/libre-chip/fayalite-deps:latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- run: |
|
||||
scripts/check-copyright.sh
|
||||
- uses: https://git.libre-chip.org/mirrors/rust-cache@v2
|
||||
with:
|
||||
save-if: ${{ github.ref == 'refs/heads/master' }}
|
||||
- run: |
|
||||
apt-get update -qq
|
||||
apt-get install -qq python3-venv wget
|
||||
# copy of https://files.openpower.foundation/s/9izgC5Rogi5Ywmm/download/OPF_PowerISA_v3.1C.pdf
|
||||
wget -O OPF_PowerISA_v3.1C.pdf https://libre-chip.org/OPF_PowerISA_v3.1C.pdf
|
||||
echo "56372d23ece7e9e2c1b381a639443982a3e16e38109df1c141d655b779b61fdb OPF_PowerISA_v3.1C.pdf" | sha256sum -c
|
||||
echo "$PDF_HASH OPF_PowerISA_v3.1C.pdf" | sha256sum -c
|
||||
- run: |
|
||||
cargo test
|
||||
- run: |
|
||||
cargo build --release
|
||||
- run: |
|
||||
cargo run --release -- OPF_PowerISA_v3.1C.pdf &> >(tee out.log | grep '^page ') || { tail -n1000 out.log; false; }
|
||||
echo "expected output (not all instructions are decoded yet, change when the output is improved):"
|
||||
echo "$OUTPUT_XML_HASH powerisa-instructions.xml" | sha256sum -c
|
||||
mv powerisa-instructions.xml powerisa-instructions-rust.xml
|
||||
- run: |
|
||||
python3 -m venv --upgrade-deps .venv
|
||||
. .venv/bin/activate
|
||||
pip install -e .
|
||||
parse_powerisa_pdf OPF_PowerISA_v3.1C.pdf &> >(tee out.log | grep '^page ') || { tail -n1000 out.log; false; }
|
||||
echo "expected output (not all instructions are decoded yet, change when the output is improved):"
|
||||
echo "c0b4592cbd0a3e59b9b2931a6a75a3d87ebf23bf453e8587a1522dd157f15ee9 powerisa-instructions.xml" | sha256sum -c
|
||||
echo "$OUTPUT_XML_HASH powerisa-instructions.xml" | sha256sum -c
|
||||
mv powerisa-instructions.xml powerisa-instructions-python.xml
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue