Skip to content

Commit

Permalink
Adapt Gitea Act Runner
Browse files Browse the repository at this point in the history
  • Loading branch information
wangkang committed Oct 23, 2024
1 parent 936a3d3 commit 513c541
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/_build_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ jobs:
with:
ref: ${{ inputs.safe-checkout }}
submodules: 'true'

- name: Install CMake
run: |
sudo apt-get update
sudo apt-get install -y cmake
- name: gRPC Cache
id: cache-grpc
uses: actions/cache@v4
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/_build_cxx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
${{ github.workspace }}/third-party/build
key: ${{ env.cache-name }} ${{ runner.os }} ${{ runner.arch }} ${{ matrix.build_type }}

- name: CMake Installation
run: |
sudo apt-get update
sudo apt-get install -y cmake
- name: CMake
if: steps.cache-grpc.outputs.cache-hit == 'true'
working-directory: ${{ github.workspace }}/demo-cxx
Expand All @@ -64,14 +68,14 @@ jobs:
ctest -C ${{ matrix.build_type }}
- name: Upload demo_cxx_hello
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
retention-days: 10
name: demo_cxx_hello-gRPC${{ matrix.grpc_version }}-${{ runner.os }}-${{ runner.arch }}
path: ${{ github.workspace }}/demo-cxx-build/demo_cxx_hello

- name: Upload demo_cxx_server
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v3
with:
retention-days: 10
name: demo_cxx_server-gRPC${{ matrix.grpc_version }}-${{ runner.os }}-${{ runner.arch }}
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/_build_rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,23 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with: { ref: '${{ inputs.safe-checkout }}' }
- name: Setup rustup
shell: bash
run: |
if command -v cargo >/dev/null 2>&1; then
echo "Installed"
else
echo "Installing"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
fi
which cargo
- name: Build
working-directory: ${{ github.workspace }}/demo-rs
run: cargo build --verbose
run: source $HOME/.cargo/env && cargo build --verbose
- name: Test
working-directory: ${{ github.workspace }}/demo-rs
run: cargo test --verbose
run: source $HOME/.cargo/env && cargo test --verbose
#steps
#build
#jobs
2 changes: 1 addition & 1 deletion .github/workflows/_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Download demo_cxx_hello
uses: actions/download-artifact@v4
uses: actions/download-artifact@v3
with:
name: demo_cxx_hello-gRPC${{ matrix.grpc_version }}-${{ runner.os }}-${{ runner.arch }}
- name: Test demo_cxx_hello
Expand Down
2 changes: 1 addition & 1 deletion demo-cxx/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.25)
cmake_minimum_required(VERSION 3.22)
project(demo_cxx)

set(CMAKE_CXX_STANDARD 17)
Expand Down

0 comments on commit 513c541

Please sign in to comment.