Skip to content

Commit

Permalink
Add archlinux CI + Silence compilation warnings on new libxml2 (#93)
Browse files Browse the repository at this point in the history
* Add archlinux CI

Copied from #91

* See if this allows me to install a specific version

* fix version

* Apply casting to do away the const explicitly
  • Loading branch information
lestrrat committed Nov 24, 2023
1 parent 93e5e3d commit 99c7102
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- master

jobs:
build:
ubuntu:
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -32,3 +32,25 @@ jobs:
check-latest: true
- name: Test
run: go test ./...
archlinux:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.21' ]
container:
image: archlinux:latest
name: "Test [ Arch Linux + Go ${{ matrix.go }} ]"
steps:
- uses: actions/checkout@v3
- name: Set Up Arch Linux
run: |
pacman -Syy --noconfirm
pacman -Syu --noconfirm
pacman -S --noconfirm base-devel
pacman -S --noconfirm libxml2=2.12.0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Test
run: go test ./...
4 changes: 2 additions & 2 deletions clib/clib.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ static inline void MY_xmlFree(void *p) {
// Macro wrapper function. cgo cannot detect function-like macros,
// so this is how we avoid it
static inline xmlError* MY_xmlLastError() {
return xmlGetLastError();
return (xmlError*) xmlGetLastError();
}
// Macro wrapper function. cgo cannot detect function-like macros,
// so this is how we avoid it
static inline xmlError* MY_xmlCtxtLastError(void *ctx) {
return xmlCtxtGetLastError(ctx);
return (xmlError*) xmlCtxtGetLastError(ctx);
}
// Change xmlIndentTreeOutput global, return old value, so caller can
Expand Down

0 comments on commit 99c7102

Please sign in to comment.