-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
33a1f9c
commit f71891f
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
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
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 |