Skip to content

Commit 9d156a9

Browse files
S41dredianthus
authored andcommitted
add arch ci
1 parent cffc0bb commit 9d156a9

3 files changed

Lines changed: 49 additions & 0 deletions

File tree

.github/workflows/build-arch.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: build-arch
2+
on:
3+
pull_request:
4+
branches:
5+
- main
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
container:
14+
image: archlinux:latest
15+
steps:
16+
- name: test
17+
run: |
18+
set -x
19+
20+
# Update system and install base dependencies
21+
pacman -Syu --noconfirm
22+
pacman -S --noconfirm git base-devel opam wget
23+
24+
git clone https://github.com/${{ github.repository }}.git
25+
cd $(basename ${{ github.repository }})
26+
27+
if [ "${{ github.event_name }}" = "pull_request" ]; then
28+
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-${{ github.event.pull_request.number }}
29+
git checkout pr-${{ github.event.pull_request.number }}
30+
else
31+
git checkout ${{ github.ref_name }}
32+
fi
33+
34+
# Prepare OCaml stuff
35+
opam init --disable-sandboxing --bare -ya
36+
opam switch create ocaml ocaml-base-compiler --criteria="-notuptodate"
37+
eval "$(opam env)"
38+
export OPAMCONFIRMLEVEL=unsafe-yes
39+
opam update
40+
41+
# Install system and opam-repo dependencies
42+
opam install . --depext-only --with-test
43+
opam install . --deps-only --with-test
44+
45+
# Build and test
46+
dune build @install
47+
dune build @quicktest

owi.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ depexts: [
7878
["rust-llvm" "libstd-rust-dev-wasm32"] {os-distribution = "debian"}
7979
["rustup" "zig"] {os-distribution = "ubuntu"}
8080
["rustup" "tinygo" "zig"] {os-distribution = "fedora"}
81+
["rust" "tinygo" "zig"] {os-distribution = "arch"}
8182
]
8283
post-messages: [
8384
"Thank you for installing Owi!"

owi.opam.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ depexts: [
55
["rust-llvm" "libstd-rust-dev-wasm32"] {os-distribution = "debian"}
66
["rustup" "zig"] {os-distribution = "ubuntu"}
77
["rustup" "tinygo" "zig"] {os-distribution = "fedora"}
8+
["rust" "tinygo" "zig"] {os-distribution = "arch"}
89
]
910
post-messages: [
1011
"Thank you for installing Owi!"

0 commit comments

Comments
 (0)