Skip to content

Commit

Permalink
ci(crit): add crit other os build test
Browse files Browse the repository at this point in the history
Signed-off-by: cg10036 <[email protected]>
  • Loading branch information
cg10036 committed Jan 7, 2025
1 parent be6305f commit 7569b33
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,26 @@ concurrency:

jobs:
test:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go-version: [1.20.x, 1.21.x, 1.22.x]
criu_branch: [master, criu-dev]
exclude:
- os: windows-latest
criu_branch: criu-dev
- os: macos-latest
criu_branch: criu-dev

steps:

- name: Checkout
uses: actions/checkout@v4

- name: Build CRIU ${{ matrix.criu_branch }}
if: runner.os == 'Linux'
run: |
sudo apt-get install -y libprotobuf-dev libprotobuf-c-dev protobuf-c-compiler protobuf-compiler python3-protobuf libnl-3-dev libnet-dev libcap-dev curl unzip
git clone --depth=1 --single-branch -b ${{ matrix.criu_branch }} https://github.com/checkpoint-restore/criu.git
Expand All @@ -34,17 +41,25 @@ jobs:
go-version: ${{ matrix.go-version }}

- name: Install protoc-gen-go
if: runner.os == 'Linux'
run: |
sudo env "GOBIN=/usr/bin" go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
- name: Test go-criu
if: runner.os == 'Linux'
run: sudo -E make test

- name: Test magicgen script
if: runner.os == 'Linux'
run: sudo -E make -C scripts/magic-gen test

- name: Test CRIT
shell: bash
run: |
if [ "${{ runner.os }}" != "Linux" ]; then
make -C crit clean bin/crit
exit 0
fi
if [ "${{ matrix.criu_branch }}" = "criu-dev" ]; then
# First update protobuf. It is too old in the Ubuntu image.
curl -Lo protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protoc-23.4-linux-x86_64.zip
Expand Down

0 comments on commit 7569b33

Please sign in to comment.