From 1a954b91ee7fc9846ededb729bfa551434c0b925 Mon Sep 17 00:00:00 2001 From: Youyuan Wu Date: Sat, 18 Nov 2023 22:12:44 -0800 Subject: [PATCH] add linux ci --- .github/workflows/build.yaml | 37 +++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3d5d3e04..fa8a9cbd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -46,4 +46,39 @@ jobs: run: Powershell.exe -File .\build\_deps\service_fabric_cpp-src\scripts\check_cluster_online.ps1 - name: run echo example app - run: Powershell.exe -File .\tests\echo_script_test.ps1 \ No newline at end of file + run: Powershell.exe -File .\tests\echo_script_test.ps1 + + build-linux: + runs-on: ${{ matrix.os }} + strategy: + matrix: + BUILD_TYPE: ["Debug"] + os: [ ubuntu-latest ] + steps: + - uses: actions/checkout@v2 + + - name: apt-get + run: apt-get install apt-transport-https curl lsb-release wget gnupg2 software-properties-common debconf-utils -y + + - name: install sf + run: | + wget -q https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/packages-microsoft-prod.deb; + dpkg -i packages-microsoft-prod.deb; + curl -fsSL https://packages.microsoft.com/keys/msopentech.asc | apt-key add - ; + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - ; + add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" ; + apt-get update; + echo "servicefabric servicefabric/accepted-eula-ga select true" | debconf-set-selections ; + echo "servicefabricsdkcommon servicefabricsdkcommon/accepted-eula-ga select true" | debconf-set-selections ; + apt-get install servicefabricsdkcommon -y + + - name: Install rust stable + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: run cmake + run: > + cmake . -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} -B build + - name: run build + run: cmake --build build --config ${{ matrix.BUILD_TYPE }} \ No newline at end of file