2021-05-17 18:20:54 +08:00
|
|
|
name: FIPS Checksums
|
|
|
|
on: [pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
compute-checksums:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: install unifdef
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install unifdef
|
|
|
|
- name: create build dirs
|
|
|
|
run: |
|
|
|
|
mkdir ./build-pristine
|
2021-05-26 19:13:02 +08:00
|
|
|
mkdir ./source-pristine
|
2021-05-17 18:20:54 +08:00
|
|
|
mkdir ./build
|
2021-05-26 19:13:02 +08:00
|
|
|
mkdir ./source
|
2021-05-19 15:50:17 +08:00
|
|
|
mkdir ./artifact
|
2021-05-26 19:13:02 +08:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.base.sha }}
|
|
|
|
path: source-pristine
|
2021-05-17 18:20:54 +08:00
|
|
|
- name: config pristine
|
2021-05-26 19:13:02 +08:00
|
|
|
run: ../source-pristine/config enable-fips && perl configdata.pm --dump
|
2021-05-17 18:20:54 +08:00
|
|
|
working-directory: ./build-pristine
|
|
|
|
- name: make build_generated pristine
|
|
|
|
run: make -s build_generated
|
|
|
|
working-directory: ./build-pristine
|
|
|
|
- name: make fips-checksums pristine
|
|
|
|
run: make fips-checksums
|
|
|
|
working-directory: ./build-pristine
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
2021-05-26 19:13:02 +08:00
|
|
|
path: source
|
2021-05-17 18:20:54 +08:00
|
|
|
- name: config
|
2021-05-26 19:13:02 +08:00
|
|
|
run: ../source/config enable-fips && perl configdata.pm --dump
|
2021-05-17 18:20:54 +08:00
|
|
|
working-directory: ./build
|
|
|
|
- name: make build_generated
|
|
|
|
run: make -s build_generated
|
|
|
|
working-directory: ./build
|
|
|
|
- name: make fips-checksums
|
|
|
|
run: make fips-checksums
|
|
|
|
working-directory: ./build
|
2021-05-26 19:13:02 +08:00
|
|
|
- name: update checksums
|
|
|
|
run: |
|
|
|
|
cp -a build-pristine/providers/fips.module.sources.new source/providers/fips.module.sources
|
|
|
|
cp -a build-pristine/providers/fips-sources.checksums.new source/providers/fips-sources.checksums
|
|
|
|
cp -a build-pristine/providers/fips.checksum.new source/providers/fips.checksum
|
2021-05-17 18:20:54 +08:00
|
|
|
- name: make diff-fips-checksums
|
2021-05-19 15:50:17 +08:00
|
|
|
run: make diff-fips-checksums && touch ../artifact/fips_unchanged || ( touch ../artifact/fips_changed ; echo FIPS CHANGED )
|
2021-05-17 18:20:54 +08:00
|
|
|
working-directory: ./build
|
2021-05-19 15:50:17 +08:00
|
|
|
- name: save PR number
|
|
|
|
run: echo ${{ github.event.number }} > ./artifact/pr_num
|
|
|
|
- name: save artifact
|
2021-05-17 18:20:54 +08:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-05-19 15:50:17 +08:00
|
|
|
name: fips_checksum
|
|
|
|
path: artifact/
|