Skip to content

Commit

Permalink
add vala
Browse files Browse the repository at this point in the history
  • Loading branch information
acheronfail committed Jan 18, 2024
1 parent fae111c commit fae1f8d
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 16 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ jobs:
- 23_bun
- 24_fortran
- 25_rust
- 26_cpp-clang
- 27_cpp-gcc
- 28_c-clang
- 29_c-gcc
- 30_nim
- 31_pascal
- 32_zig
- 33_assembly
- 34_ocaml
- 26_vala
- 27_cpp-clang
- 28_cpp-gcc
- 29_c-clang
- 30_c-gcc
- 31_nim
- 32_pascal
- 33_zig
- 34_assembly
runs-on: ubuntu-latest
container:
image: acheronfail/count
Expand Down
33 changes: 26 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,33 @@ FROM ubuntu:23.04

ENV DEBIAN_FRONTEND="noninteractive" TZ="Europe/London"

RUN apt-get update && apt-get install -y \
bc build-essential clang curl default-jdk default-jre erlang fp-compiler gdb \
ghc lldb gforth gfortran git gnu-smalltalk gnucobol3 golang jq kotlin lua5.4 \
mono-complete moreutils nasm ocaml php ruby scala swi-prolog tar tcl unzip \
wget xz-utils \
&& apt-get clean
RUN apt-get update
RUN apt-get install -y bc build-essential curl gdb lldb git jq moreutils tar \
unzip wget xz-utils && apt-get clean
RUN apt-get install -y clang && apt-get clean
RUN apt-get install -y default-jdk default-jre && apt-get clean
RUN apt-get install -y erlang && apt-get clean
RUN apt-get install -y fp-compiler && apt-get clean
RUN apt-get install -y ghc && apt-get clean
RUN apt-get install -y gforth && apt-get clean
RUN apt-get install -y gfortran && apt-get clean
RUN apt-get install -y gnu-smalltalk && apt-get clean
RUN apt-get install -y gnucobol3 && apt-get clean
RUN apt-get install -y golang && apt-get clean
RUN apt-get install -y kotlin && apt-get clean
RUN apt-get install -y lua5.4 && apt-get clean
RUN apt-get install -y mono-complete && apt-get clean
RUN apt-get install -y nasm && apt-get clean
RUN apt-get install -y ocaml && apt-get clean
RUN apt-get install -y php && apt-get clean
RUN apt-get install -y ruby && apt-get clean
RUN apt-get install -y scala && apt-get clean
RUN apt-get install -y swi-prolog && apt-get clean
RUN apt-get install -y tcl && apt-get clean
RUN apt-get install -y valac && apt-get clean

RUN curl -fSL https://deb.nodesource.com/setup_lts.x | bash - \
&& apt-get install -y nodejs \
&& apt-get install -y nodejs && apt-get clean \
&& npm install --global coffeescript

RUN curl -fSL https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
Expand Down
10 changes: 10 additions & 0 deletions count.vala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
int main(string[] args) {
int target = int.parse(args[1]);
int i = 0;
while (i < target) {
i = (i + 1) | 1;
}

stdout.printf("%d\n", i);
return 0;
}
5 changes: 5 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,8 @@ build-csharp: (_check "mcs mono") && (_size "count.exe") (_sizet "bytecode")
build-ocaml: (_check "ocaml")
ocaml --version > VERSION
echo 'ocaml ./count.ml {{i}}' > CMD

build-vala: (_check "valac") && (_size "count")
valac --version > VERSION
valac ./count.vala -o count --Xcc=-O3
echo './count {{i}}' > CMD

0 comments on commit fae1f8d

Please sign in to comment.