diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index c613f2c0..80290fb3 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -6,39 +6,33 @@ jobs: # Build image and push to container registry docker-build: - runs-on: ubuntu-20.04 - name: Build and Push + runs-on: linux_x64 steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Set up Docker BuildX - uses: docker/setup-buildx-action@v3 - with: - config-inline: | - [registry."git.prettyhefty.com"] - - - name: Login to Registry - uses: docker/login-action@v3 - with: - registry: https://git.prettyhefty.com - username: ${{ gitea.repository_owner }} - password: ${{ secrets.REGISTRY_TOKEN }} - - - name: Setup environment - run: cp Dockerfile.linux Dockerfile - - - name: Build and push - uses: docker/build-push-action@v6 - with: - context: . - push: true - tags: bill/monero:test - - - name: sha256sum - run: shasum -a256 /workspace/Bill/monero-gui/build/release/bin/monero-wallet-gui - - - name: test qml - run: xvfb-run -a /workspace/Bill/monero-gui/build/release/bin/monero-wallet-gui --test-qml \ No newline at end of file + - uses: actions/checkout@v1 + with: + submodules: recursive + - uses: satackey/action-docker-layer-caching@v0.0.11 + if: "!startsWith(github.ref, 'refs/tags/v')" + continue-on-error: true + with: + key: docker-linux-static-{hash} + restore-keys: | + docker-linux-static- + - name: install dependencies + run: sudo apt -y install xvfb libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-xkb1 libxcb-shape0 libxkbcommon-x11-0 + - name: free up diskspace + run: ${{env.FREE_DISKSPACE}} + - name: prepare build environment + run: docker build --tag monero:build-env-linux --build-arg THREADS=3 --file Dockerfile.linux . + - name: build + run: docker run --rm -v /home/runner/work/monero-gui/monero-gui:/monero-gui -w /monero-gui monero:build-env-linux sh -c 'make release-static -j3' + - name: sha256sum + run: shasum -a256 /home/runner/work/monero-gui/monero-gui/build/release/bin/monero-wallet-gui + - name: test qml + run: xvfb-run -a /home/runner/work/monero-gui/monero-gui/build/release/bin/monero-wallet-gui --test-qml + - uses: actions/upload-artifact@v2 + with: + name: ${{ github.job }} + path: | + /home/runner/work/monero-gui/monero-gui/build/release/bin/monero-wallet-gui + /home/runner/work/monero-gui/monero-gui/build/release/bin/monerod \ No newline at end of file