Skip to content

Commit

Permalink
ci: Publish nightly releases
Browse files Browse the repository at this point in the history
  • Loading branch information
javierhonduco committed Jan 25, 2025
1 parent 33a1f9c commit f71891f
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: release
on:
pull_request:
push:
branches:
- main

jobs:
nightly-build:
strategy:
matrix:
config: [
{os: ubuntu-22.04, target: x86_64-unknown-linux-gnu},
{os: ubuntu-22.04-arm, target: aarch64-unknown-linux-gnu}
]
compiler: [ {cpp: g++, c: gcc}, {cpp: g++-8, c: gcc-8}, {cpp: clang++, c: clang} ]

runs-on: ${{ matrix.config.os }}
permissions:
id-token: write
contents: read

steps:
- uses: actions/checkout@main
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Set up nix dev env
run: nix develop --command echo 0
- name: Build container image
run: nix build .#container
- name: Upload container
uses: actions/upload-artifact@main
with:
name: lightswitch-container-${{ matrix.config.target }}
path: ./result
- name: Build `lightswitch` statically linked with glibc
run: nix develop --ignore-environment --command bash -c 'RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target {{ matrix.config.target }}'
- name: Upload static binary
uses: actions/upload-artifact@main
with:
name: lightswitch-glic-static-${{ matrix.config.target }}
path: ./target/${{ matrix.config.target }}/release/lightswitch

nightly-release:
runs-on: ubuntu-22.04
needs: [nightly-build]
steps:
- uses: actions/download-artifact@v4
- name: Display structure of downloaded files
run: ls -R

0 comments on commit f71891f

Please sign in to comment.