Use current directory as rpath #52
Workflow file for this run
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
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
test: | |
name: Unit tester | |
env: | |
FIPS_REPO: fips-crypto-repo | |
FIPS_DIR: fips-temp | |
FIPS_GOLANG_REPO: fips-golang-repo | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Set up Go 1.19 | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.19 | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
with: | |
path: ${{ env.FIPS_GOLANG_REPO }} | |
- uses: actions/checkout@v3 | |
with: | |
repository: PreVeil/fips-crypto | |
ref: refs/tags/release/1.2.2 | |
fetch-depth: 0 | |
token: ${{ secrets.PREVEIL_DEPLOY_USER_TOKEN }} | |
path: ${{ env.FIPS_REPO }} | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ secrets.AWS_DEFAULT_REGION }} | |
- name: Download fips libraries | |
run: | | |
COMMIT_ID=$(git rev-list -n 1 release/1.2.2) | |
echo "fips-commit-id:" $COMMIT_ID | |
rm -rf $FIPS_DIR && mkdir $FIPS_DIR | |
mkdir $FIPS_DIR/fips-crypto | |
cp ./lib/fips-crypto.h $FIPS_DIR/fips-crypto | |
aws s3 cp s3://pv-bin-storage/ci/fipscrypto_build_osx/$COMMIT_ID/libfips-crypto.dylib $FIPS_DIR/libfips-crypto.dylib | |
aws s3 cp s3://pv-bin-storage/ci/fipscrypto_build_osx/$COMMIT_ID/libfips-crypto.dylib.hmac $FIPS_DIR/libfips-crypto.dylib.hmac | |
aws s3 cp s3://pv-bin-storage/ci/fipscrypto_build_win_64/$COMMIT_ID/libfips-crypto.dll $FIPS_DIR/libfips-crypto.dll | |
aws s3 cp s3://pv-bin-storage/ci/fipscrypto_build_win_64/$COMMIT_ID/libfips-crypto.dll.hmac $FIPS_DIR/libfips-crypto.dll.hmac | |
aws s3 cp s3://pv-bin-storage/ci/fipscrypto_build_linux/$COMMIT_ID/libfips-crypto.so $FIPS_DIR/libfips-crypto.so | |
aws s3 cp s3://pv-bin-storage/ci/fipscrypto_build_linux/$COMMIT_ID/libfips-crypto.so.hmac $FIPS_DIR/libfips-crypto.so.hmac | |
echo "$FIPS_DIR" >> $GITHUB_PATH | |
shell: bash | |
working-directory: ./${{ env.FIPS_REPO }} | |
env: | |
FIPS_DIR: ../${{ env.FIPS_GOLANG_REPO }}/${{ env.FIPS_DIR }} | |
- name: Set up fips-crypto | |
if: matrix.os == 'macos-latest' | |
run: | | |
rm -rf /usr/local/include/fips-crypto && mkdir /usr/local/include/fips-crypto | |
cp $(pwd)/$FIPS_DIR/fips-crypto/fips-crypto.h /usr/local/include/fips-crypto | |
cp $(pwd)/$FIPS_DIR/libfips-crypto.dylib /usr/local/lib | |
cp $(pwd)/$FIPS_DIR/libfips-crypto.dylib.hmac /usr/local/lib | |
working-directory: ./${{ env.FIPS_GOLANG_REPO }} | |
- name: Set up fips-crypto | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
rm -rf /usr/local/include/fips-crypto && sudo mkdir /usr/include/fips-crypto | |
sudo cp $(pwd)/$FIPS_DIR/fips-crypto/fips-crypto.h /usr/include/fips-crypto | |
sudo cp $(pwd)/$FIPS_DIR/libfips-crypto.so /usr/lib | |
sudo cp $(pwd)/$FIPS_DIR/libfips-crypto.so.hmac /usr/lib | |
sudo chmod +x /usr/lib/libfips-crypto.so | |
sudo chown $USER /usr/lib/libfips-crypto.so | |
sudo chown $USER /usr/lib/libfips-crypto.so.hmac | |
sudo chown -R $USER /usr/include/fips-crypto | |
working-directory: ./${{ env.FIPS_GOLANG_REPO }} | |
- name: Run unit tests | |
run: FIPSDIR=$(pwd)/$FIPS_DIR make test | |
shell: bash | |
working-directory: ./${{ env.FIPS_GOLANG_REPO }} | |
- name: Run code vetting | |
run: FIPSDIR=$(pwd)/$FIPS_DIR make vet | |
shell: bash | |
working-directory: ./${{ env.FIPS_GOLANG_REPO }} |