bump dependencies #175
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: {} | |
workflow_dispatch: {} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
bazel-sync: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: actions/checkout@v2 | |
- run: DOCKER_BUILDKIT=1 docker build -o=. --target=sync . --progress=plain | |
- run: git --no-pager diff --exit-code | |
continue-on-error: true | |
build_on_ubuntu_with_gcc: | |
name: on ubuntu with GCC | |
runs-on: ubuntu-latest | |
steps: | |
- uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: actions/checkout@v2 | |
- run: DOCKER_BUILDKIT=1 docker build -o=./bin/ --target=voidstar . --progress=plain | |
- run: ./bin/voidstar --help | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: voidstar_gcc_ubuntu | |
path: ./bin/voidstar | |
- run: DOCKER_BUILDKIT=1 docker build -o=. --target=video-gcc . --progress=plain | |
- run: mv ./bin/voidstar voidstar_gcc_ubuntu | |
- run: mv ./video.mp4 video_gcc_ubuntu.mp4 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: video-gcc_ubuntu | |
path: ./video_gcc_ubuntu.mp4 | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
voidstar_gcc_ubuntu | |
video_gcc_ubuntu.mp4 | |
build_on_ubuntu_with_clang: | |
name: on ubuntu with Clang | |
runs-on: ubuntu-latest | |
steps: | |
- uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- uses: actions/checkout@v2 | |
- run: DOCKER_BUILDKIT=1 docker build -o=./bin/ --target=voidstar-clang . --progress=plain | |
- run: ./bin/voidstar --help | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: voidstar_clang_ubuntu | |
path: ./bin/voidstar | |
- run: DOCKER_BUILDKIT=1 docker build -o=. --target=video-clang . --progress=plain | |
- run: mv ./bin/voidstar voidstar_clang_ubuntu | |
- run: mv ./video.mp4 video_clang_ubuntu.mp4 | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: video-clang_ubuntu | |
path: ./video_clang_ubuntu.mp4 | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
voidstar_clang_ubuntu | |
video_clang_ubuntu.mp4 | |
build_on_macos: | |
name: on macos | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.cache/bazel | |
key: bazel | |
- name: Work around caching gobbledegook | |
run: | | |
if [[ -d ~/.cache/bazel ]]; then | |
chmod -R a+rwx ~/.cache/bazel | |
fi | |
- run: bazel build voidstar | |
- run: cp ./bazel-bin/voidstar/voidstar voidstar_clang_macos | |
- run: | | |
chmod +w voidstar_clang_macos | |
strip voidstar_clang_macos | |
- run: ./voidstar_clang_macos --help | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: voidstar_macos-latest | |
path: voidstar_clang_macos | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: voidstar_clang_macos | |
build_on_windows: | |
name: on windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: bazelbuild/setup-bazelisk@v1 | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.cache/bazel | |
key: bazel | |
- name: Work around caching gobbledegook | |
run: | | |
if [[ -d ~/.cache/bazel ]]; then | |
chmod -R a+rwx ~/.cache/bazel | |
fi | |
- name: Work around windows compiler # TODO: a specific bazel --config | |
run: | | |
grep -vE 'fdiagnostics-color|std=c' .bazelrc >.bazelrc~ && mv .bazelrc~ .bazelrc | |
echo "build --cxxopt='-std:c++17'" >>.bazelrc | |
echo 'COPTS = []' >variables.bzl | |
- run: bazel build voidstar || true # TODO | |
# - run: ls -lha ./bazel-bin/voidstar/ | |
# - run: strip ./bazel-bin/voidstar/voidstar.exe | |
# - run: ./bazel-bin/voidstar/voidstar.exe --help | |
# - uses: actions/upload-artifact@v2 | |
# with: | |
# name: voidstar_windows-latest | |
# path: ./bazel-bin/voidstar/voidstar.exe | |
# - run: mv ./bazel-bin/voidstar/voidstar.exe voidstar_clang_windows.exe | |
# - uses: softprops/action-gh-release@v1 | |
# if: startsWith(github.ref, 'refs/tags/') | |
# with: | |
# files: voidstar_clang_windows.exe |