bin/build/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Mon, 07 Oct 2024 23:31:51 -0500
changeset 239 c3e3169399a8
parent 228 ff776d663062
permissions -rw-r--r--
Updated java version and disabled geyser due to too old jde.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
228
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
- name: install cargo
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
  apt: name="cargo"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
- name: unarchive bin
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
  unarchive:
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
    remote_src: yes
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
    src: "{{bin_tar}}"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
    dest: "/tmp/"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
    creates: "{{bin_build_dir}}"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
- name: check if bin build exists
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
  stat:
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
    path: "{{bin_build_dir}}/target/release/bin"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
  register: build_file
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
- name: build bin
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
  command: "cargo build --release"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
  args:
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
    chdir: "{{bin_build_dir}}"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
  when: not build_file.stat.exists
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    24
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    25
- name: create build server dir
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    26
  become: yes
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    27
  file:
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    28
    path: "{{bin_srv_dir}}"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    29
    mode: "0755"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    30
    state: "directory"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    31
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    32
- name: copy bin to build server dir
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    33
  become: yes
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    34
  copy:
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    35
    remote_src: yes
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    36
    src: "{{bin_build_dir}}/target/release/bin"
ff776d663062 Added pastebin bin role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    37
    dest: "{{bin_srv_dir}}/bin"