Skip to content

👷 Try using devenv for CI environment #25

👷 Try using devenv for CI environment

👷 Try using devenv for CI environment #25

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Create Artifact
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: ["*"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
# Give the runner some swap space in an attempt to stop gkrust from crashing the build
- name: Set Swap Space
uses: pierotofy/[email protected]
with:
swap-size-gb: 6
- name: Setup git
run: |
git config --global user.email "[email protected]"
git config --global user.name "TrickyPR"
- name: Free up space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
# - name: Install sccache
# env:
# LINK: https://github.com/mozilla/sccache/releases/download
# SCCACHE_VERSION: 0.2.13
# run: |
# SCCACHE_FILE=sccache-$SCCACHE_VERSION-x86_64-unknown-linux-musl
# mkdir -p $HOME/.local/bin
# curl -L "$LINK/$SCCACHE_VERSION/$SCCACHE_FILE.tar.gz" | tar xz
# mv -f $SCCACHE_FILE/sccache $HOME/.local/bin/sccache
# echo "$HOME/.local/bin" >> $GITHUB_PATH
# - name: Save sccache
# uses: actions/cache@v3
# continue-on-error: false
# with:
# path: /home/runner/.cache/sccache
# key: ${{ runner.os }}-sccache
# - uses: pnpm/action-setup@v2
# name: Install pnpm
# id: pnpm-install
# with:
# version: 8
# run_install: false
# - name: Get pnpm store directory
# id: pnpm-cache
# shell: bash
# run: |
# echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
# - uses: actions/cache@v3
# name: Setup pnpm cache
# with:
# path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
# restore-keys: |
# ${{ runner.os }}-pnpm-store-
# - name: Install dependencies
# run: pnpm install
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- name: Download firefox source and dependencies
run: devenv shell download
- name: Import
run: devenv shell import
- name: Build
run: devenv shell build
- name: Package
# .mar files are not properly generated, but it should be fine
continue-on-error: true
run: devenv shell package
- name: Rename artifacts
run: |
mv dist/experiment-runtime-*.tar.bz2 "runtime.linux.tar.bz2"
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: runtime.linux.tar.bz2
path: ./runtime.linux.tar.bz2
- name: Make artifact available
uses: "marvinpinto/action-automatic-releases@latest"
if: github.ref == 'refs/heads/main'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Artifact Build"
files: |
runtime.linux.tar.bz2