Skip to content

Commit

Permalink
test build
Browse files Browse the repository at this point in the history
  • Loading branch information
z4yx committed Jul 6, 2024
1 parent dc7d92d commit d3736e7
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,39 @@ jobs:
path: opensc*.deb
key: ${{ runner.os }}-${{ env.cache-name }}
- name: Check file existence
id: check_deb_files
id: check_opensc
uses: andstor/file-existence-action@v1
with:
files: "opensc*.deb"
- name: Check file existence
id: check_yubico_piv
uses: andstor/file-existence-action@v1
with:
files: "yubico-piv-tool*.deb"
- name: Package Install
if: steps.check_deb_files.outputs.files_exists == 'false'
if: steps.check_opensc.outputs.files_exists == 'false' || steps.check_yubico_piv.outputs.files_exists == 'false'
run: |
sudo sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -q -y curl git gcc g++ cmake swig psmisc procps debian-keyring devscripts
sudo apt-get build-dep -q -y opensc
sudo rm -f /usr/bin/clang-tidy
- name: Build yubico-piv-tool package
run: |
set -x
git clone https://github.com/z4yx/yubico-piv-tool.git
cd yubico-piv-tool
mkdir build_dir;
pushd build_dir; cmake -DCMAKE_INSTALL_PREFIX=../debian/tmp/usr .. -B .; popd
make -C build_dir
pushd build_dir; cmake -P cmake_install.cmake; popd
mkdir debian/tmp/DEBIAN
dpkg-gencontrol -pyubico-piv-tool
dpkg --build debian/tmp build_dir/
mv build_dir/yubico-piv-tool_*_amd64.deb .
sudo apt install ./yubico-piv-tool_*_amd64.deb
- name: Build the package
if: steps.check_deb_files.outputs.files_exists == 'false'
if: steps.check_opensc.outputs.files_exists == 'false'
run: |
dget http://archive.ubuntu.com/ubuntu/pool/universe/o/opensc/opensc_0.23.0-0.1ubuntu1.dsc
cd opensc-0.23.0
Expand Down Expand Up @@ -56,7 +75,7 @@ jobs:
run: |
sudo apt-add-repository ppa:yubico/stable
sudo apt-get update
sudo apt-get install -q -y git gcc g++ cmake swig psmisc procps pcscd pcsc-tools yubico-piv-tool libhidapi-dev libassuan-dev libgcrypt20-dev libksba-dev libnpth0-dev libssl3 zlib1g libglib2.0-0 openssl openssh-server libpcsclite-dev libudev-dev libcmocka-dev python3-pip python3-setuptools python3-wheel lcov yubikey-manager libcbor-dev
sudo apt-get install -q -y git gcc g++ cmake swig psmisc procps pcscd pcsc-tools libhidapi-dev libassuan-dev libgcrypt20-dev libksba-dev libnpth0-dev libssl3 zlib1g libglib2.0-0 openssl openssh-server libpcsclite-dev libudev-dev libcmocka-dev python3-pip python3-setuptools python3-wheel lcov yubikey-manager libcbor-dev
sudo dpkg -i opensc*.deb
pip3 install --upgrade pip
Expand Down

0 comments on commit d3736e7

Please sign in to comment.