Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Github Actions CI workflows #28

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: master

on: [push]

env:
timeout: 10

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Install build requirements
run: |
sudo apt-get update
sudo apt-get install build-essential rpm python3 -y
- name: Build with make
timeout-minutes: ${{ fromJSON(env.timeout) }}
run: make build
- name: Check help
run: ./scion-bootstrapper --help
- name: Install test requirements
run: |
wget https://github.com/scionproto/scion/releases/download/v0.12.0/scion_0.12.0_amd64_linux.tar.gz -O /tmp/scion_0.12.0_amd64_linux.tar.gz
tar -C /usr/local/bin -xf /tmp/scion_0.12.0_amd64_linux.tar.gz scion-pki
- name: Make all
timeout-minutes: ${{ fromJSON(env.timeout) }}
run: make all
- name: Check output
run: ls -a ./scion-bootstrapper ./bin/

build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
#- name: Print environment
# run: cmd.exe /K set
#- name: Print environment
# run: gci env:* | sort-object name
- name: Build with make
timeout-minutes: ${{ fromJSON(env.timeout) }}
run: make.exe bootstrapper
- name: Check output
run: dir scion-bootstrapper.exe
- name: Check help
run: ./scion-bootstrapper.exe --help

build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
#- name: Print environment
# run: env
- name: Build with make
timeout-minutes: ${{ fromJSON(env.timeout) }}
run: make bootstrapper
- name: Check output
run: ls -a ./scion-bootstrapper ./bin/
- name: Check help
run: ./scion-bootstrapper --help
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bootstrapper:
@if [ -n "$${OS}" ] ; then \
UNAME_OS="$${OS}"; \
else \
UNAME_OS=$$(uname --kernel-name); \
UNAME_OS=$$(uname -s); \
fi; \
if [ "$${UNAME_OS}" = "Linux" ] ; then \
make -s build; \
Expand Down
2 changes: 1 addition & 1 deletion hinting/dns_search_domain_fallbacks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestReverseLookupDomains(t *testing.T) {
domain string
}{
{ip: netip.MustParseAddr("163.152.6.10"), domain: "korea.ac.kr"},
{ip: randIPFromCIDR("163.152.6.16/29"), domain: "korea.ac.kr"},
{ip: randIPFromCIDR("163.152.6.24/29"), domain: "korea.ac.kr"},
},
},
}
Expand Down