From ce6395192abdc63c071b82256871ada73668bd32 Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Sun, 21 Apr 2024 11:55:24 +0200 Subject: [PATCH] ci: run build test on github --- .builds/build.yml | 2 +- .builds/test.yml | 2 +- .builds/unit-tests.yml | 2 +- .github/workflows/build.yml | 40 +++++++++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build.yml diff --git a/.builds/build.yml b/.builds/build.yml index cf866ed5..f442a680 100644 --- a/.builds/build.yml +++ b/.builds/build.yml @@ -4,7 +4,7 @@ sources: tasks: - install: | sudo pacman -Syu --noconfirm - sudo pacman -S --noconfirm rustup libinput pango mesa libxkbcommon cmake + sudo pacman -S --noconfirm rustup libinput pango mesa libxkbcommon cmake shaderc rustup toolchain install stable - build: | cd jay diff --git a/.builds/test.yml b/.builds/test.yml index 446d1f25..2d962d79 100644 --- a/.builds/test.yml +++ b/.builds/test.yml @@ -4,7 +4,7 @@ sources: tasks: - install: | sudo pacman -Syu --noconfirm - sudo pacman -S --noconfirm rustup libinput pango mesa libxkbcommon xorg-xwayland adwaita-icon-theme libxcursor cmake + sudo pacman -S --noconfirm rustup libinput pango mesa libxkbcommon xorg-xwayland adwaita-icon-theme libxcursor cmake shaderc rustup toolchain install stable - configure: | sudo rmmod bochs diff --git a/.builds/unit-tests.yml b/.builds/unit-tests.yml index ec92b6af..d53ca632 100644 --- a/.builds/unit-tests.yml +++ b/.builds/unit-tests.yml @@ -4,7 +4,7 @@ sources: tasks: - install: | sudo pacman -Syu --noconfirm - sudo pacman -S --noconfirm rustup libinput pango mesa libxkbcommon xorg-xwayland adwaita-icon-theme libxcursor cmake + sudo pacman -S --noconfirm rustup libinput pango mesa libxkbcommon xorg-xwayland adwaita-icon-theme libxcursor cmake shaderc rustup toolchain install stable cd jay git submodule update --init diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..e7c4976c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: build + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + workflow_dispatch: + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Show env + run: | + uname -a + ldd --version + env + - name: Install + run: | + sudo apt update + sudo apt install -y libinput-dev libpango1.0-dev libudev-dev libxkbcommon-dev libshaderc-dev + curl https://sh.rustup.rs -sSf | sh -s -- -y + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + - name: Fixup opt levels + run: | + sed -i 's/opt-level = 3/opt-level = 0/' Cargo.toml + cat Cargo.toml + - name: Build + run: cargo build --timings + - name: Archive cargo-timings + uses: actions/upload-artifact@v4 + with: + name: cargo-timings + path: | + target/cargo-timings