hggq is testing out GitHub Actions 🚀 #156
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: win vcpkg | |
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 | |
on: [push] | |
jobs: | |
Explore-GitHub-Actions: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
arch: [amd64] | |
ssl: [ON] | |
steps: | |
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Restore vcpkg packages | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
run: | | |
powershell Invoke-WebRequest -OutFile vcpkg2024.zip https://github.com/microsoft/vcpkg/archive/refs/tags/2024.09.30.zip | |
unzip vcpkg2024.zip | |
mv vcpkg-2024.09.30 vcpkg | |
cd vcpkg | |
# We'll need it later -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg is fix vcpkg directory | |
- run: | | |
bootstrap-vcpkg.bat | |
vcpkg integrate install | |
vcpkg integrate project | |
vcpkg install | |
cd ${{ github.workspace }} | |
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." | |
- run: echo "🖥️ The workflow is now ready to test your code on the runner." | |
# - name: download mysql | |
# run: | | |
# powershell Invoke-WebRequest -OutFile mysql.zip https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-8.0.35-winx64.zip | |
# unzip mysql.zip | |
# Move-Item -Path ./mysql-8.0.35-winx64/include -Destination ./ | |
# Move-Item -Path ./mysql-8.0.35-winx64/lib -Destination ./ | |
# ls include | |
- name: Install ninja-build tool | |
uses: seanmiddleditch/gha-setup-ninja@v3 | |
- name: Enable Developer Command Prompt | |
uses: ilammy/msvc-dev-cmd@v1.12.0 | |
with: | |
arch: ${{ matrix.arch }} | |
- name: List files in the repository | |
run: | | |
unzip asio.zip | |
ls ${{ github.workspace }} | |
- run: echo "🍏 This job's status is ${{ job.status }}." | |
- name: Build | |
run: | | |
cmake . -B ${{github.workspace}} -DENABLE_WIN_VCPKG=ON -DENABLE_VCPKG=ON -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_BUILD_TYPE=Debug -G Ninja | |
- name: Build | |
run: cmake --build ${{github.workspace}} --config Debug |